aboutsummaryrefslogtreecommitdiff
path: root/src/include/commands/trigger.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-07-28 02:56:31 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-07-28 02:56:31 +0000
commitc1b9ec24efb5d576800fb5163acab6bdefb4391c (patch)
tree794244f01dbc2ebd663513115b7a08c9d9fa0141 /src/include/commands/trigger.h
parent36942504fc7d0738191573225cc9d8e905a74f4b (diff)
downloadpostgresql-c1b9ec24efb5d576800fb5163acab6bdefb4391c.tar.gz
postgresql-c1b9ec24efb5d576800fb5163acab6bdefb4391c.zip
Add system catalog columns pg_constraint.conindid and pg_trigger.tgconstrindid.
conindid is the index supporting a constraint. We can use this not only for unique/primary-key constraints, but also foreign-key constraints, which depend on the unique index that constrains the referenced columns. tgconstrindid is just copied from the constraint's conindid field, or is zero for triggers not associated with constraints. This is mainly intended as infrastructure for upcoming patches, but it has some virtue in itself, since it exposes a relationship that you formerly had to grovel in pg_depend to determine. I simplified one information_schema view accordingly. (There is a pg_dump query that could also use conindid, but I left it alone because it wasn't clear it'd get any faster.)
Diffstat (limited to 'src/include/commands/trigger.h')
-rw-r--r--src/include/commands/trigger.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h
index 7e886eede41..3e14bbe3baa 100644
--- a/src/include/commands/trigger.h
+++ b/src/include/commands/trigger.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.73 2009/06/11 14:49:11 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/commands/trigger.h,v 1.74 2009/07/28 02:56:31 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -104,7 +104,8 @@ extern PGDLLIMPORT int SessionReplicationRole;
#define TRIGGER_FIRES_ON_REPLICA 'R'
#define TRIGGER_DISABLED 'D'
-extern Oid CreateTrigger(CreateTrigStmt *stmt, Oid constraintOid,
+extern Oid CreateTrigger(CreateTrigStmt *stmt,
+ Oid constraintOid, Oid indexOid,
bool checkPermissions);
extern void DropTrigger(Oid relid, const char *trigname,