summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2022-11-08 17:45:29 +0000
committerPeter Eisentraut2022-11-08 17:45:29 +0000
commitb5621b66e778112c78d381414dff8917320f71d2 (patch)
tree5a36b1c150e56ff71fae7e0cae7200da6f21cc7c
parent042c9091f0fc131d001516bafc9ce334fe20d711 (diff)
Unify some internal error message wordings
-rw-r--r--src/backend/catalog/aclchk.c8
-rw-r--r--src/backend/catalog/objectaddress.c12
-rw-r--r--src/backend/commands/alter.c4
-rw-r--r--src/backend/utils/adt/acl.c4
4 files changed, 14 insertions, 14 deletions
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index aa5a2ed948..42360d37ca 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -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;
diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c
index 284ca55469..c7de7232b8 100644
--- a/src/backend/catalog/objectaddress.c
+++ b/src/backend/catalog/objectaddress.c
@@ -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;
diff --git a/src/backend/commands/alter.c b/src/backend/commands/alter.c
index 55219bb097..5dabba4dd0 100644
--- a/src/backend/commands/alter.c
+++ b/src/backend/commands/alter.c
@@ -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;
}
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 4fac402e5b..0bc79cba2b 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -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));