1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-07 19:06:32 +03:00

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.
This commit is contained in:
Tom Lane
2002-04-01 22:36:13 +00:00
parent 6a25cd6b26
commit 789ddcb5fe
6 changed files with 370 additions and 254 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: rel.h,v 1.58 2002/03/31 06:26:32 tgl Exp $
* $Id: rel.h,v 1.59 2002/04/01 22:36:13 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,12 +49,14 @@ typedef LockInfoData *LockInfo;
*/
typedef struct Trigger
{
Oid tgoid;
Oid tgoid; /* OID of trigger (pg_trigger row) */
/* Remaining fields are copied from pg_trigger, see pg_trigger.h */
char *tgname;
Oid tgfoid;
int16 tgtype;
bool tgenabled;
bool tgisconstraint;
Oid tgconstrrelid;
bool tgdeferrable;
bool tginitdeferred;
int16 tgnargs;