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:
@ -877,6 +877,8 @@ RenameTableSpace(const char *oldname, const char *newname)
|
||||
simple_heap_update(rel, &newtuple->t_self, newtuple);
|
||||
CatalogUpdateIndexes(rel, newtuple);
|
||||
|
||||
InvokeObjectPostAlterHook(TableSpaceRelationId, tspId, 0);
|
||||
|
||||
heap_close(rel, NoLock);
|
||||
|
||||
return tspId;
|
||||
@ -945,6 +947,9 @@ AlterTableSpaceOptions(AlterTableSpaceOptionsStmt *stmt)
|
||||
/* Update system catalog. */
|
||||
simple_heap_update(rel, &newtuple->t_self, newtuple);
|
||||
CatalogUpdateIndexes(rel, newtuple);
|
||||
|
||||
InvokeObjectPostAlterHook(TableSpaceRelationId, HeapTupleGetOid(tup), 0);
|
||||
|
||||
heap_freetuple(newtuple);
|
||||
|
||||
/* Conclude heap scan. */
|
||||
|
Reference in New Issue
Block a user