summaryrefslogtreecommitdiff
path: root/src/include/catalog/pg_trigger.h
diff options
context:
space:
mode:
authorJan Wieck <JanWieck@Yahoo.com>1999-09-29 16:06:40 +0000
committerJan Wieck <JanWieck@Yahoo.com>1999-09-29 16:06:40 +0000
commit1547ee017c897725221d0752af4477121524c05b (patch)
tree775616278865cba3e01e521812d045489e40fd9b /src/include/catalog/pg_trigger.h
parentd810338d29bff178101e72c810c9dcfa3223c6c0 (diff)
downloadpostgresql-1547ee017c897725221d0752af4477121524c05b.tar.gz
This is part #1 for of the DEFERRED CONSTRAINT TRIGGER support.
Implements the CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands. TODO: Generic builtin trigger procedures Automatic execution of appropriate CREATE CONSTRAINT... at CREATE TABLE Support of new trigger type in pg_dump Swapping of huge # of events to disk Jan
Diffstat (limited to 'src/include/catalog/pg_trigger.h')
-rw-r--r--src/include/catalog/pg_trigger.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/include/catalog/pg_trigger.h b/src/include/catalog/pg_trigger.h
index 2d12e73da5..be0633eb98 100644
--- a/src/include/catalog/pg_trigger.h
+++ b/src/include/catalog/pg_trigger.h
@@ -33,6 +33,13 @@ CATALOG(pg_trigger) BOOTSTRAP
Oid tgfoid; /* OID of function to be called */
int2 tgtype; /* BEFORE/AFTER UPDATE/DELETE/INSERT
* ROW/STATEMENT */
+ bool tgenabled; /* trigger is enabled/disabled */
+ bool tgisconstraint; /* trigger is a RI constraint */
+ NameData tgconstrname; /* RI constraint name */
+ Oid tgconstrrelid; /* RI table of foreign key definition */
+ /* in the case of ON DELETE or ON UPDATE */
+ bool tgdeferrable; /* RI trigger is deferrable */
+ bool tginitdeferred; /* RI trigger is deferred initially */
int2 tgnargs; /* # of extra arguments in tgargs */
int28 tgattr; /* UPDATE of attr1, attr2 ... (NI) */
bytea tgargs; /* first\000second\000tgnargs\000 */
@@ -49,14 +56,20 @@ typedef FormData_pg_trigger *Form_pg_trigger;
* compiler constants for pg_trigger
* ----------------
*/
-#define Natts_pg_trigger 7
+#define Natts_pg_trigger 13
#define Anum_pg_trigger_tgrelid 1
#define Anum_pg_trigger_tgname 2
#define Anum_pg_trigger_tgfoid 3
#define Anum_pg_trigger_tgtype 4
-#define Anum_pg_trigger_tgnargs 5
-#define Anum_pg_trigger_tgattr 6
-#define Anum_pg_trigger_tgargs 7
+#define Anum_pg_trigger_tgenabled 5
+#define Anum_pg_trigger_tgisconstraint 6
+#define Anum_pg_trigger_tgconstrname 7
+#define Anum_pg_trigger_tgconstrrelid 8
+#define Anum_pg_trigger_tgdeferrable 9
+#define Anum_pg_trigger_tginitdeferred 10
+#define Anum_pg_trigger_tgnargs 11
+#define Anum_pg_trigger_tgattr 12
+#define Anum_pg_trigger_tgargs 13
#define TRIGGER_TYPE_ROW (1 << 0)
#define TRIGGER_TYPE_BEFORE (1 << 1)