aboutsummaryrefslogtreecommitdiff
path: root/src/include/catalog/pg_trigger.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/catalog/pg_trigger.h')
-rw-r--r--src/include/catalog/pg_trigger.h39
1 files changed, 18 insertions, 21 deletions
diff --git a/src/include/catalog/pg_trigger.h b/src/include/catalog/pg_trigger.h
index 8e1a4bf12b7..7c954750433 100644
--- a/src/include/catalog/pg_trigger.h
+++ b/src/include/catalog/pg_trigger.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/catalog/pg_trigger.h,v 1.38 2010/01/05 01:06:57 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_trigger.h,v 1.39 2010/01/17 22:56:23 tgl Exp $
*
* NOTES
* the genbki.pl script reads this file and generates .bki
@@ -25,11 +25,10 @@
* pg_trigger definition. cpp turns this into
* typedef struct FormData_pg_trigger
*
- * Note: when tgconstraint is nonzero, tgisconstraint must be true, and
- * tgconstrname, tgconstrrelid, tgconstrindid, tgdeferrable, tginitdeferred
- * are redundant with the referenced pg_constraint entry. The reason we keep
- * these fields is that we support "stand-alone" constraint triggers with no
- * corresponding pg_constraint entry.
+ * Note: when tgconstraint is nonzero, tgconstrrelid, tgconstrindid,
+ * tgdeferrable, and tginitdeferred are largely redundant with the referenced
+ * pg_constraint entry. However, it is possible for a non-deferrable trigger
+ * to be associated with a deferrable constraint.
* ----------------
*/
#define TriggerRelationId 2620
@@ -43,11 +42,10 @@ CATALOG(pg_trigger,2620)
* ROW/STATEMENT; see below */
char tgenabled; /* trigger's firing configuration WRT
* session_replication_role */
- bool tgisconstraint; /* trigger is a constraint trigger */
- NameData tgconstrname; /* constraint name */
+ bool tgisinternal; /* trigger is system-generated */
Oid tgconstrrelid; /* constraint's FROM table, if any */
Oid tgconstrindid; /* constraint's supporting index, if any */
- Oid tgconstraint; /* owning pg_constraint entry, if any */
+ Oid tgconstraint; /* associated pg_constraint entry, if any */
bool tgdeferrable; /* constraint trigger is deferrable */
bool tginitdeferred; /* constraint trigger is deferred initially */
int2 tgnargs; /* # of extra arguments in tgargs */
@@ -69,23 +67,22 @@ typedef FormData_pg_trigger *Form_pg_trigger;
* compiler constants for pg_trigger
* ----------------
*/
-#define Natts_pg_trigger 16
+#define Natts_pg_trigger 15
#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_tgenabled 5
-#define Anum_pg_trigger_tgisconstraint 6
-#define Anum_pg_trigger_tgconstrname 7
-#define Anum_pg_trigger_tgconstrrelid 8
-#define Anum_pg_trigger_tgconstrindid 9
-#define Anum_pg_trigger_tgconstraint 10
-#define Anum_pg_trigger_tgdeferrable 11
-#define Anum_pg_trigger_tginitdeferred 12
-#define Anum_pg_trigger_tgnargs 13
-#define Anum_pg_trigger_tgattr 14
-#define Anum_pg_trigger_tgargs 15
-#define Anum_pg_trigger_tgqual 16
+#define Anum_pg_trigger_tgisinternal 6
+#define Anum_pg_trigger_tgconstrrelid 7
+#define Anum_pg_trigger_tgconstrindid 8
+#define Anum_pg_trigger_tgconstraint 9
+#define Anum_pg_trigger_tgdeferrable 10
+#define Anum_pg_trigger_tginitdeferred 11
+#define Anum_pg_trigger_tgnargs 12
+#define Anum_pg_trigger_tgattr 13
+#define Anum_pg_trigger_tgargs 14
+#define Anum_pg_trigger_tgqual 15
/* Bits within tgtype */
#define TRIGGER_TYPE_ROW (1 << 0)