Unify some internal error message wordings
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 8 Nov 2022 17:45:29 +0000 (18:45 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 8 Nov 2022 17:45:29 +0000 (18:45 +0100)
src/backend/catalog/aclchk.c
src/backend/catalog/objectaddress.c
src/backend/commands/alter.c
src/backend/utils/adt/acl.c

index aa5a2ed9483e71b74da18c277f2ef4f108c88590..42360d37ca59531edd87cff97ab8c0b2ac8ec528 100644 (file)
@@ -1245,7 +1245,7 @@ SetDefaultACL(InternalDefaultACL *iacls)
            break;
 
        default:
-           elog(ERROR, "unrecognized objtype: %d",
+           elog(ERROR, "unrecognized object type: %d",
                 (int) iacls->objtype);
            objtype = 0;        /* keep compiler quiet */
            break;
@@ -3590,7 +3590,7 @@ aclcheck_error(AclResult aclerr, ObjectType objtype,
                    case OBJECT_TSPARSER:
                    case OBJECT_TSTEMPLATE:
                    case OBJECT_USER_MAPPING:
-                       elog(ERROR, "unsupported object type %d", objtype);
+                       elog(ERROR, "unsupported object type: %d", objtype);
                }
 
                ereport(ERROR,
@@ -3728,7 +3728,7 @@ aclcheck_error(AclResult aclerr, ObjectType objtype,
                    case OBJECT_TSPARSER:
                    case OBJECT_TSTEMPLATE:
                    case OBJECT_USER_MAPPING:
-                       elog(ERROR, "unsupported object type %d", objtype);
+                       elog(ERROR, "unsupported object type: %d", objtype);
                }
 
                ereport(ERROR,
@@ -3828,7 +3828,7 @@ pg_aclmask(ObjectType objtype, Oid table_oid, AttrNumber attnum, Oid roleid,
        case OBJECT_TYPE:
            return pg_type_aclmask(table_oid, roleid, mask, how);
        default:
-           elog(ERROR, "unrecognized objtype: %d",
+           elog(ERROR, "unrecognized object type: %d",
                 (int) objtype);
            /* not reached, but keep compiler quiet */
            return ACL_NO_RIGHTS;
index 284ca55469e0331fe3e1996fd88c71d237a4bce3..c7de7232b8908d9cda81ebc58a871863c96497aa 100644 (file)
@@ -1164,7 +1164,7 @@ get_object_address(ObjectType objtype, Node *object,
                address.objectSubId = 0;
                break;
            default:
-               elog(ERROR, "unrecognized objtype: %d", (int) objtype);
+               elog(ERROR, "unrecognized object type: %d", (int) objtype);
                /* placate compiler, in case it thinks elog might return */
                address.classId = InvalidOid;
                address.objectId = InvalidOid;
@@ -1355,7 +1355,7 @@ get_object_address_unqualified(ObjectType objtype,
            address.objectSubId = 0;
            break;
        default:
-           elog(ERROR, "unrecognized objtype: %d", (int) objtype);
+           elog(ERROR, "unrecognized object type: %d", (int) objtype);
            /* placate compiler, which doesn't know elog won't return */
            address.classId = InvalidOid;
            address.objectId = InvalidOid;
@@ -1432,7 +1432,7 @@ get_relation_by_qualified_name(ObjectType objtype, List *object,
                                RelationGetRelationName(relation))));
            break;
        default:
-           elog(ERROR, "unrecognized objtype: %d", (int) objtype);
+           elog(ERROR, "unrecognized object type: %d", (int) objtype);
            break;
    }
 
@@ -1508,7 +1508,7 @@ get_object_address_relobject(ObjectType objtype, List *object,
            address.objectSubId = 0;
            break;
        default:
-           elog(ERROR, "unrecognized objtype: %d", (int) objtype);
+           elog(ERROR, "unrecognized object type: %d", (int) objtype);
    }
 
    /* Avoid relcache leak when object not found. */
@@ -1700,7 +1700,7 @@ get_object_address_opcf(ObjectType objtype, List *object, bool missing_ok)
            address.objectSubId = 0;
            break;
        default:
-           elog(ERROR, "unrecognized objtype: %d", (int) objtype);
+           elog(ERROR, "unrecognized object type: %d", (int) objtype);
            /* placate compiler, which doesn't know elog won't return */
            address.classId = InvalidOid;
            address.objectId = InvalidOid;
@@ -1818,7 +1818,7 @@ get_object_address_opf_member(ObjectType objtype,
            }
            break;
        default:
-           elog(ERROR, "unrecognized objtype: %d", (int) objtype);
+           elog(ERROR, "unrecognized object type: %d", (int) objtype);
    }
 
    return address;
index 55219bb0974ad5e2e5c861d2e3805758950b2b2b..5dabba4dd065e121d5fe9c0d755d4f29339b1dff 100644 (file)
@@ -99,7 +99,7 @@ report_name_conflict(Oid classId, const char *name)
            msgfmt = gettext_noop("subscription \"%s\" already exists");
            break;
        default:
-           elog(ERROR, "unsupported object class %u", classId);
+           elog(ERROR, "unsupported object class: %u", classId);
            break;
    }
 
@@ -142,7 +142,7 @@ report_namespace_conflict(Oid classId, const char *name, Oid nspOid)
            msgfmt = gettext_noop("text search configuration \"%s\" already exists in schema \"%s\"");
            break;
        default:
-           elog(ERROR, "unsupported object class %u", classId);
+           elog(ERROR, "unsupported object class: %u", classId);
            break;
    }
 
index 4fac402e5b6486ed0c04850dbbaebe1b9c3e5537..0bc79cba2b190bba89a7fa1414c66003416e1a88 100644 (file)
@@ -807,7 +807,7 @@ acldefault(ObjectType objtype, Oid ownerId)
            owner_default = ACL_ALL_RIGHTS_PARAMETER_ACL;
            break;
        default:
-           elog(ERROR, "unrecognized objtype: %d", (int) objtype);
+           elog(ERROR, "unrecognized object type: %d", (int) objtype);
            world_default = ACL_NO_RIGHTS;  /* keep compiler quiet */
            owner_default = ACL_NO_RIGHTS;
            break;
@@ -904,7 +904,7 @@ acldefault_sql(PG_FUNCTION_ARGS)
            objtype = OBJECT_TYPE;
            break;
        default:
-           elog(ERROR, "unrecognized objtype abbreviation: %c", objtypec);
+           elog(ERROR, "unrecognized object type abbreviation: %c", objtypec);
    }
 
    PG_RETURN_ACL_P(acldefault(objtype, owner));