mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +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:
@ -777,6 +777,8 @@ AlterRole(AlterRoleStmt *stmt)
|
||||
/* Update indexes */
|
||||
CatalogUpdateIndexes(pg_authid_rel, new_tuple);
|
||||
|
||||
InvokeObjectPostAlterHook(AuthIdRelationId, roleid, 0);
|
||||
|
||||
ReleaseSysCache(tuple);
|
||||
heap_freetuple(new_tuple);
|
||||
|
||||
@ -1161,6 +1163,8 @@ RenameRole(const char *oldname, const char *newname)
|
||||
|
||||
CatalogUpdateIndexes(rel, newtuple);
|
||||
|
||||
InvokeObjectPostAlterHook(AuthIdRelationId, roleid, 0);
|
||||
|
||||
ReleaseSysCache(oldtuple);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user