mirror of
https://github.com/postgres/postgres.git
synced 2026-01-05 23:38:41 +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:
@@ -107,7 +107,7 @@ pg_prewarm(PG_FUNCTION_ARGS)
|
||||
rel = relation_open(relOid, AccessShareLock);
|
||||
aclresult = pg_class_aclcheck(relOid, GetUserId(), ACL_SELECT);
|
||||
if (aclresult != ACLCHECK_OK)
|
||||
aclcheck_error(aclresult, ACL_KIND_CLASS, get_rel_name(relOid));
|
||||
aclcheck_error(aclresult, get_relkind_objtype(rel->rd_rel->relkind), get_rel_name(relOid));
|
||||
|
||||
/* Check that the fork exists. */
|
||||
RelationOpenSmgr(rel);
|
||||
|
||||
Reference in New Issue
Block a user