mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Extend object-access hook machinery to support post-alter events.
This also slightly widens the scope of what we support in terms of post-create events. KaiGai Kohei, with a few changes, mostly to the comments, by me
This commit is contained in:
@ -412,6 +412,9 @@ AlterEventTrigger(AlterEventTrigStmt *stmt)
|
||||
simple_heap_update(tgrel, &tup->t_self, tup);
|
||||
CatalogUpdateIndexes(tgrel, tup);
|
||||
|
||||
InvokeObjectPostAlterHook(EventTriggerRelationId,
|
||||
trigoid, 0);
|
||||
|
||||
/* clean up */
|
||||
heap_freetuple(tup);
|
||||
heap_close(tgrel, RowExclusiveLock);
|
||||
@ -507,6 +510,9 @@ AlterEventTriggerOwner_internal(Relation rel, HeapTuple tup, Oid newOwnerId)
|
||||
changeDependencyOnOwner(EventTriggerRelationId,
|
||||
HeapTupleGetOid(tup),
|
||||
newOwnerId);
|
||||
|
||||
InvokeObjectPostAlterHook(EventTriggerRelationId,
|
||||
HeapTupleGetOid(tup), 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user