mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +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:
@ -55,7 +55,7 @@ CreateConversionCommand(CreateConversionStmt *stmt)
|
||||
/* Check we have creation rights in target namespace */
|
||||
aclresult = pg_namespace_aclcheck(namespaceId, GetUserId(), ACL_CREATE);
|
||||
if (aclresult != ACLCHECK_OK)
|
||||
aclcheck_error(aclresult, ACL_KIND_NAMESPACE,
|
||||
aclcheck_error(aclresult, OBJECT_SCHEMA,
|
||||
get_namespace_name(namespaceId));
|
||||
|
||||
/* Check the encoding names */
|
||||
@ -90,7 +90,7 @@ CreateConversionCommand(CreateConversionStmt *stmt)
|
||||
/* Check we have EXECUTE rights for the function */
|
||||
aclresult = pg_proc_aclcheck(funcoid, GetUserId(), ACL_EXECUTE);
|
||||
if (aclresult != ACLCHECK_OK)
|
||||
aclcheck_error(aclresult, ACL_KIND_PROC,
|
||||
aclcheck_error(aclresult, OBJECT_FUNCTION,
|
||||
NameListToString(func_name));
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user