diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-01 22:36:13 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-01 22:36:13 +0000 |
commit | 789ddcb5fe0584fd7524db97909ff43cb2ac37f6 (patch) | |
tree | d94e23b6e5606aee2bbe5d5006e6107863daa160 /src/backend/commands/trigger.c | |
parent | 6a25cd6b26cc5012828119f9c01c93b9d4d46ad7 (diff) | |
download | postgresql-789ddcb5fe0584fd7524db97909ff43cb2ac37f6.tar.gz postgresql-789ddcb5fe0584fd7524db97909ff43cb2ac37f6.zip |
Add tgconstrrelid to stored Trigger structures, make RI trigger functions
depend on this rather than the trigger argument strings to locate the
other relation to test. This makes RI triggers function properly in
the presence of schemas and temp tables. Along the way, fix bogus lack
of locking in RI triggers, handle quoting of names fully correctly,
compute required sizes of query buffers with some semblance of accuracy.
Diffstat (limited to 'src/backend/commands/trigger.c')
-rw-r--r-- | src/backend/commands/trigger.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index c20c2637178..c05b2ec51a3 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.110 2002/03/31 06:26:30 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.111 2002/04/01 22:36:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -544,6 +544,7 @@ RelationBuildTriggers(Relation relation) build->tgtype = pg_trigger->tgtype; build->tgenabled = pg_trigger->tgenabled; build->tgisconstraint = pg_trigger->tgisconstraint; + build->tgconstrrelid = pg_trigger->tgconstrrelid; build->tgdeferrable = pg_trigger->tgdeferrable; build->tginitdeferred = pg_trigger->tginitdeferred; build->tgnargs = pg_trigger->tgnargs; @@ -763,6 +764,8 @@ equalTriggerDescs(TriggerDesc *trigdesc1, TriggerDesc *trigdesc2) return false; if (trig1->tgisconstraint != trig2->tgisconstraint) return false; + if (trig1->tgconstrrelid != trig2->tgconstrrelid) + return false; if (trig1->tgdeferrable != trig2->tgdeferrable) return false; if (trig1->tginitdeferred != trig2->tginitdeferred) |