pgsql: Change FK trigger naming convention to fix self-referential FKs. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Change FK trigger naming convention to fix self-referential FKs.
Date
Msg-id E1RJ78r-0008Vt-Cj@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Change FK trigger naming convention to fix self-referential FKs.

Use names like "RI_ConstraintTrigger_a_NNNN" for FK action triggers and
"RI_ConstraintTrigger_c_NNNN" for FK check triggers.  This ensures the
action trigger fires first in self-referential cases where the very same
row update fires both an action and a check trigger.  This change provides
a non-probabilistic solution for bug #6268, at the risk that it could break
client code that is making assumptions about the exact names assigned to
auto-generated FK triggers.  Hence, change this in HEAD only.  No need for
forced initdb since old triggers continue to work fine.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1e3b21dd5e1070d301153690c1751bef74f03fa4

Modified Files
--------------
src/backend/commands/tablecmds.c |   26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Change FK trigger creation order to better support self-referent
Next
From: Magnus Hagander
Date:
Subject: pgsql: MingW doesn't support wcstombs_s()...