aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-04-19 16:36:08 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-04-19 16:36:08 +0000
commit201737168c4ed5b14313d111d8d746c7f072f24e (patch)
tree4936cf1082506bbf110dbf49d7e219f92e729c0d /src/backend/commands/tablecmds.c
parent87d00363cb46aa5f69ec4ed7874c356a0db8f25a (diff)
downloadpostgresql-201737168c4ed5b14313d111d8d746c7f072f24e.tar.gz
postgresql-201737168c4ed5b14313d111d8d746c7f072f24e.zip
pg_trigger's index on tgrelid is replaced by a unique index on
(tgrelid, tgname). This provides an additional check on trigger name uniqueness per-table (which was already enforced by the code anyway). With this change, RelationBuildTriggers will read the triggers in order by tgname, since it's scanning using this index. Since a predictable trigger ordering has been requested for some time, document this behavior as a feature. Also document that rules fire in name order, since yesterday's changes to pg_rewrite indexing cause that too.
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r--src/backend/commands/tablecmds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 8abd8cf80de..b0b73af76e4 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.3 2002/04/18 20:01:09 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.4 2002/04/19 16:36:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2909,10 +2909,10 @@ update_ri_trigger_args(Oid relid,
if (fk_scan)
irel = index_openr(TriggerConstrRelidIndex);
else
- irel = index_openr(TriggerRelidIndex);
+ irel = index_openr(TriggerRelidNameIndex);
ScanKeyEntryInitialize(&skey[0], 0x0,
- 1, /* always column 1 of index */
+ 1, /* column 1 of index in either case */
F_OIDEQ,
ObjectIdGetDatum(relid));
idxtgscan = index_beginscan(irel, false, 1, skey);