Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b5621b6

Browse files
committed
Unify some internal error message wordings
1 parent 042c909 commit b5621b6

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/backend/catalog/aclchk.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ SetDefaultACL(InternalDefaultACL *iacls)
12451245
break;
12461246

12471247
default:
1248-
elog(ERROR, "unrecognized objtype: %d",
1248+
elog(ERROR, "unrecognized object type: %d",
12491249
(int) iacls->objtype);
12501250
objtype = 0; /* keep compiler quiet */
12511251
break;
@@ -3590,7 +3590,7 @@ aclcheck_error(AclResult aclerr, ObjectType objtype,
35903590
case OBJECT_TSPARSER:
35913591
case OBJECT_TSTEMPLATE:
35923592
case OBJECT_USER_MAPPING:
3593-
elog(ERROR, "unsupported object type %d", objtype);
3593+
elog(ERROR, "unsupported object type: %d", objtype);
35943594
}
35953595

35963596
ereport(ERROR,
@@ -3728,7 +3728,7 @@ aclcheck_error(AclResult aclerr, ObjectType objtype,
37283728
case OBJECT_TSPARSER:
37293729
case OBJECT_TSTEMPLATE:
37303730
case OBJECT_USER_MAPPING:
3731-
elog(ERROR, "unsupported object type %d", objtype);
3731+
elog(ERROR, "unsupported object type: %d", objtype);
37323732
}
37333733

37343734
ereport(ERROR,
@@ -3828,7 +3828,7 @@ pg_aclmask(ObjectType objtype, Oid table_oid, AttrNumber attnum, Oid roleid,
38283828
case OBJECT_TYPE:
38293829
return pg_type_aclmask(table_oid, roleid, mask, how);
38303830
default:
3831-
elog(ERROR, "unrecognized objtype: %d",
3831+
elog(ERROR, "unrecognized object type: %d",
38323832
(int) objtype);
38333833
/* not reached, but keep compiler quiet */
38343834
return ACL_NO_RIGHTS;

src/backend/catalog/objectaddress.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ get_object_address(ObjectType objtype, Node *object,
11641164
address.objectSubId = 0;
11651165
break;
11661166
default:
1167-
elog(ERROR, "unrecognized objtype: %d", (int) objtype);
1167+
elog(ERROR, "unrecognized object type: %d", (int) objtype);
11681168
/* placate compiler, in case it thinks elog might return */
11691169
address.classId = InvalidOid;
11701170
address.objectId = InvalidOid;
@@ -1355,7 +1355,7 @@ get_object_address_unqualified(ObjectType objtype,
13551355
address.objectSubId = 0;
13561356
break;
13571357
default:
1358-
elog(ERROR, "unrecognized objtype: %d", (int) objtype);
1358+
elog(ERROR, "unrecognized object type: %d", (int) objtype);
13591359
/* placate compiler, which doesn't know elog won't return */
13601360
address.classId = InvalidOid;
13611361
address.objectId = InvalidOid;
@@ -1432,7 +1432,7 @@ get_relation_by_qualified_name(ObjectType objtype, List *object,
14321432
RelationGetRelationName(relation))));
14331433
break;
14341434
default:
1435-
elog(ERROR, "unrecognized objtype: %d", (int) objtype);
1435+
elog(ERROR, "unrecognized object type: %d", (int) objtype);
14361436
break;
14371437
}
14381438

@@ -1508,7 +1508,7 @@ get_object_address_relobject(ObjectType objtype, List *object,
15081508
address.objectSubId = 0;
15091509
break;
15101510
default:
1511-
elog(ERROR, "unrecognized objtype: %d", (int) objtype);
1511+
elog(ERROR, "unrecognized object type: %d", (int) objtype);
15121512
}
15131513

15141514
/* Avoid relcache leak when object not found. */
@@ -1700,7 +1700,7 @@ get_object_address_opcf(ObjectType objtype, List *object, bool missing_ok)
17001700
address.objectSubId = 0;
17011701
break;
17021702
default:
1703-
elog(ERROR, "unrecognized objtype: %d", (int) objtype);
1703+
elog(ERROR, "unrecognized object type: %d", (int) objtype);
17041704
/* placate compiler, which doesn't know elog won't return */
17051705
address.classId = InvalidOid;
17061706
address.objectId = InvalidOid;
@@ -1818,7 +1818,7 @@ get_object_address_opf_member(ObjectType objtype,
18181818
}
18191819
break;
18201820
default:
1821-
elog(ERROR, "unrecognized objtype: %d", (int) objtype);
1821+
elog(ERROR, "unrecognized object type: %d", (int) objtype);
18221822
}
18231823

18241824
return address;

src/backend/commands/alter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ report_name_conflict(Oid classId, const char *name)
9999
msgfmt = gettext_noop("subscription \"%s\" already exists");
100100
break;
101101
default:
102-
elog(ERROR, "unsupported object class %u", classId);
102+
elog(ERROR, "unsupported object class: %u", classId);
103103
break;
104104
}
105105

@@ -142,7 +142,7 @@ report_namespace_conflict(Oid classId, const char *name, Oid nspOid)
142142
msgfmt = gettext_noop("text search configuration \"%s\" already exists in schema \"%s\"");
143143
break;
144144
default:
145-
elog(ERROR, "unsupported object class %u", classId);
145+
elog(ERROR, "unsupported object class: %u", classId);
146146
break;
147147
}
148148

src/backend/utils/adt/acl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ acldefault(ObjectType objtype, Oid ownerId)
807807
owner_default = ACL_ALL_RIGHTS_PARAMETER_ACL;
808808
break;
809809
default:
810-
elog(ERROR, "unrecognized objtype: %d", (int) objtype);
810+
elog(ERROR, "unrecognized object type: %d", (int) objtype);
811811
world_default = ACL_NO_RIGHTS; /* keep compiler quiet */
812812
owner_default = ACL_NO_RIGHTS;
813813
break;
@@ -904,7 +904,7 @@ acldefault_sql(PG_FUNCTION_ARGS)
904904
objtype = OBJECT_TYPE;
905905
break;
906906
default:
907-
elog(ERROR, "unrecognized objtype abbreviation: %c", objtypec);
907+
elog(ERROR, "unrecognized object type abbreviation: %c", objtypec);
908908
}
909909

910910
PG_RETURN_ACL_P(acldefault(objtype, owner));

0 commit comments

Comments
 (0)