mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +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:
@@ -61,3 +61,26 @@ RunObjectDropHook(Oid classId, Oid objectId, int subId,
|
||||
classId, objectId, subId,
|
||||
(void *) &drop_arg);
|
||||
}
|
||||
|
||||
/*
|
||||
* RunObjectPostAlterHook
|
||||
*
|
||||
* It is entrypoint of OAT_POST_ALTER event
|
||||
*/
|
||||
void
|
||||
RunObjectPostAlterHook(Oid classId, Oid objectId, int subId,
|
||||
Oid auxiliaryId, bool is_internal)
|
||||
{
|
||||
ObjectAccessPostAlter pa_arg;
|
||||
|
||||
/* caller should check, but just in case... */
|
||||
Assert(object_access_hook != NULL);
|
||||
|
||||
memset(&pa_arg, 0, sizeof(ObjectAccessPostAlter));
|
||||
pa_arg.auxiliary_id = auxiliaryId;
|
||||
pa_arg.is_internal = is_internal;
|
||||
|
||||
(*object_access_hook)(OAT_POST_ALTER,
|
||||
classId, objectId, subId,
|
||||
(void *) &pa_arg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user