diff options
Diffstat (limited to 'src/backend/catalog/index.c')
-rw-r--r-- | src/backend/catalog/index.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index 0591c084273..0c2e4576977 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -48,6 +48,7 @@ #include "catalog/pg_type.h" #include "catalog/storage.h" #include "commands/tablecmds.h" +#include "commands/event_trigger.h" #include "commands/trigger.h" #include "executor/executor.h" #include "miscadmin.h" @@ -194,7 +195,8 @@ relationHasPrimaryKey(Relation rel) void index_check_primary_key(Relation heapRel, IndexInfo *indexInfo, - bool is_alter_table) + bool is_alter_table, + IndexStmt *stmt) { List *cmds; int i; @@ -262,7 +264,11 @@ index_check_primary_key(Relation heapRel, * unduly. */ if (cmds) + { + EventTriggerAlterTableStart((Node *) stmt); AlterTableInternal(RelationGetRelid(heapRel), cmds, true); + EventTriggerAlterTableEnd(); + } } /* |