summaryrefslogtreecommitdiff
path: root/src/backend/commands/schemacmds.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2013-03-17 22:55:14 -0400
committerRobert Haas <rhaas@postgresql.org>2013-03-17 22:57:26 -0400
commit05f3f9c7b2922b2a064418b5cd87b372d1b73412 (patch)
tree7532a7b338b36b659ddcfba50ebfcad22852e946 /src/backend/commands/schemacmds.c
parent6ac7facdd3990baf47efc124e9d7229422a06452 (diff)
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
Diffstat (limited to 'src/backend/commands/schemacmds.c')
-rw-r--r--src/backend/commands/schemacmds.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c
index 1e857d988fe..21d7e608df4 100644
--- a/src/backend/commands/schemacmds.c
+++ b/src/backend/commands/schemacmds.c
@@ -21,6 +21,7 @@
#include "catalog/dependency.h"
#include "catalog/indexing.h"
#include "catalog/namespace.h"
+#include "catalog/objectaccess.h"
#include "catalog/pg_namespace.h"
#include "commands/dbcommands.h"
#include "commands/schemacmds.h"
@@ -240,6 +241,8 @@ RenameSchema(const char *oldname, const char *newname)
simple_heap_update(rel, &tup->t_self, tup);
CatalogUpdateIndexes(rel, tup);
+ InvokeObjectPostAlterHook(NamespaceRelationId, HeapTupleGetOid(tup), 0);
+
heap_close(rel, NoLock);
heap_freetuple(tup);
@@ -376,4 +379,6 @@ AlterSchemaOwner_internal(HeapTuple tup, Relation rel, Oid newOwnerId)
newOwnerId);
}
+ InvokeObjectPostAlterHook(NamespaceRelationId,
+ HeapTupleGetOid(tup), 0);
}