Skip to content

Commit 8d6e5f0

Browse files
committed
heap_destroy:RelationRemoveTriggers()
1 parent 6c42b36 commit 8d6e5f0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/backend/catalog/heap.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.22 1997/08/22 14:10:24 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.23 1997/09/04 13:17:59 vadim Exp $
1111
*
1212
* INTERFACE ROUTINES
1313
* heap_creatr() - Create an uncataloged heap relation
@@ -41,6 +41,7 @@
4141
#include <catalog/pg_type.h>
4242
#include <catalog/pg_attrdef.h>
4343
#include <catalog/pg_relcheck.h>
44+
#include <commands/trigger.h>
4445
#include <storage/bufmgr.h>
4546
#include <storage/lmgr.h>
4647
#include <storage/smgr.h>
@@ -1298,6 +1299,10 @@ heap_destroy(char *relname)
12981299
RelationRemoveRules(rid);
12991300
}
13001301

1302+
/* triggers */
1303+
if ( rdesc->rd_rel->reltriggers > 0 )
1304+
RelationRemoveTriggers (rdesc);
1305+
13011306
/* ----------------
13021307
* delete attribute tuples
13031308
* ----------------

0 commit comments

Comments
 (0)