mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +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:
@ -519,7 +519,7 @@ AlterEventTrigger(AlterEventTrigStmt *stmt)
|
||||
trigoid = HeapTupleGetOid(tup);
|
||||
|
||||
if (!pg_event_trigger_ownercheck(trigoid, GetUserId()))
|
||||
aclcheck_error(ACLCHECK_NOT_OWNER, ACL_KIND_EVENT_TRIGGER,
|
||||
aclcheck_error(ACLCHECK_NOT_OWNER, OBJECT_EVENT_TRIGGER,
|
||||
stmt->trigname);
|
||||
|
||||
/* tuple is a copy, so we can modify it below */
|
||||
@ -610,7 +610,7 @@ AlterEventTriggerOwner_internal(Relation rel, HeapTuple tup, Oid newOwnerId)
|
||||
return;
|
||||
|
||||
if (!pg_event_trigger_ownercheck(HeapTupleGetOid(tup), GetUserId()))
|
||||
aclcheck_error(ACLCHECK_NOT_OWNER, ACL_KIND_EVENT_TRIGGER,
|
||||
aclcheck_error(ACLCHECK_NOT_OWNER, OBJECT_EVENT_TRIGGER,
|
||||
NameStr(form->evtname));
|
||||
|
||||
/* New owner must be a superuser */
|
||||
|
Reference in New Issue
Block a user