Unify some internal error message wordings
This commit is contained in:
parent
042c9091f0
commit
b5621b66e7
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user