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:
@ -2573,6 +2573,8 @@ AlterExtensionNamespace(List *names, const char *newschema)
|
||||
changeDependencyFor(ExtensionRelationId, extensionOid,
|
||||
NamespaceRelationId, oldNspOid, nspOid);
|
||||
|
||||
InvokeObjectPostAlterHook(ExtensionRelationId, extensionOid, 0);
|
||||
|
||||
return extensionOid;
|
||||
}
|
||||
|
||||
@ -2856,6 +2858,8 @@ ApplyExtensionUpdates(Oid extensionOid,
|
||||
recordDependencyOn(&myself, &otherext, DEPENDENCY_NORMAL);
|
||||
}
|
||||
|
||||
InvokeObjectPostAlterHook(ExtensionRelationId, extensionOid, 0);
|
||||
|
||||
/*
|
||||
* Finally, execute the update script file
|
||||
*/
|
||||
@ -2969,6 +2973,8 @@ ExecAlterExtensionContentsStmt(AlterExtensionContentsStmt *stmt)
|
||||
extension_config_remove(extension.objectId, object.objectId);
|
||||
}
|
||||
|
||||
InvokeObjectPostAlterHook(ExtensionRelationId, extension.objectId, 0);
|
||||
|
||||
/*
|
||||
* If get_object_address() opened the relation for us, we close it to keep
|
||||
* the reference count correct - but we retain any locks acquired by
|
||||
|
Reference in New Issue
Block a user