mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +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:
@ -97,7 +97,7 @@ calculate_database_size(Oid dbOid)
|
||||
if (aclresult != ACLCHECK_OK &&
|
||||
!is_member_of_role(GetUserId(), DEFAULT_ROLE_READ_ALL_STATS))
|
||||
{
|
||||
aclcheck_error(aclresult, ACL_KIND_DATABASE,
|
||||
aclcheck_error(aclresult, OBJECT_DATABASE,
|
||||
get_database_name(dbOid));
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ calculate_tablespace_size(Oid tblspcOid)
|
||||
{
|
||||
aclresult = pg_tablespace_aclcheck(tblspcOid, GetUserId(), ACL_CREATE);
|
||||
if (aclresult != ACLCHECK_OK)
|
||||
aclcheck_error(aclresult, ACL_KIND_TABLESPACE,
|
||||
aclcheck_error(aclresult, OBJECT_TABLESPACE,
|
||||
get_tablespace_name(tblspcOid));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user