mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Replace AclObjectKind with ObjectType
AclObjectKind was basically just another enumeration for object types, and we already have a preferred one for that. It's only used in aclcheck_error. By using ObjectType instead, we can also give some more precise error messages, for example "index" instead of "relation". Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
This commit is contained in:
@ -951,7 +951,7 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla
|
||||
aclresult = pg_type_aclcheck(relation->rd_rel->reltype, GetUserId(),
|
||||
ACL_USAGE);
|
||||
if (aclresult != ACLCHECK_OK)
|
||||
aclcheck_error(aclresult, ACL_KIND_TYPE,
|
||||
aclcheck_error(aclresult, OBJECT_TYPE,
|
||||
RelationGetRelationName(relation));
|
||||
}
|
||||
else
|
||||
@ -959,7 +959,7 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla
|
||||
aclresult = pg_class_aclcheck(RelationGetRelid(relation), GetUserId(),
|
||||
ACL_SELECT);
|
||||
if (aclresult != ACLCHECK_OK)
|
||||
aclcheck_error(aclresult, ACL_KIND_CLASS,
|
||||
aclcheck_error(aclresult, get_relkind_objtype(relation->rd_rel->relkind),
|
||||
RelationGetRelationName(relation));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user