Skip to content

Commit c67208b

Browse files
committed
Calls of RelationBuildTriggers() & FreeTriggerDesc()
1 parent 283e18a commit c67208b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/backend/utils/cache/relcache.c

Lines changed: 12 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/utils/cache/relcache.c,v 1.19 1997/08/22 03:35:44 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.20 1997/09/01 08:04:38 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -263,6 +263,9 @@ static void IndexedAccessMethodInitialize(Relation relation);
263263
static void AttrDefaultFetch (Relation relation);
264264
static void RelCheckFetch (Relation relation);
265265

266+
extern void RelationBuildTriggers (Relation relation);
267+
extern void FreeTriggerDesc (Relation relation);
268+
266269
/*
267270
* newlyCreatedRelns -
268271
* relations created during this transaction. We need to keep track of
@@ -892,6 +895,12 @@ RelationBuildDesc(RelationBuildDescInfo buildinfo)
892895
relation->rd_rules = NULL;
893896
}
894897

898+
/* Triggers */
899+
if ( relp->reltriggers > 0 )
900+
RelationBuildTriggers (relation);
901+
else
902+
relation->trigdesc = NULL;
903+
895904
/* ----------------
896905
* initialize index strategy and support information for this relation
897906
* ----------------
@@ -1290,6 +1299,8 @@ RelationFlushRelation(Relation *relationPtr,
12901299
RelationCacheDelete(relation);
12911300

12921301
FreeTupleDesc (relation->rd_att);
1302+
1303+
FreeTriggerDesc (relation);
12931304

12941305
#if 0
12951306
if (relation->rd_rules) {

0 commit comments

Comments
 (0)