mirror of
https://github.com/postgres/postgres.git
synced 2025-12-07 12:02:30 +03:00
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.
This commit is contained in:
@@ -899,7 +899,7 @@ delete from pktable where base1=2;
|
||||
ERROR: <unnamed> referential integrity violation - key in pktable still referenced from pktable
|
||||
-- fails (1,1) is being referenced (twice)
|
||||
update pktable set base1=3 where base1=1;
|
||||
ERROR: <unnamed> referential integrity violation - key in pktable still referenced from pktable
|
||||
ERROR: <unnamed> referential integrity violation - key referenced from pktable not found in pktable
|
||||
-- this sequence of two deletes will work, since after the first there will be no (2,*) references
|
||||
delete from pktable where base2=2;
|
||||
delete from pktable where base1=2;
|
||||
|
||||
Reference in New Issue
Block a user