pgsql: Fix incorrect trigger-property updating in ALTER CONSTRAINT.
От | Tom Lane |
---|---|
Тема | pgsql: Fix incorrect trigger-property updating in ALTER CONSTRAINT. |
Дата | |
Msg-id | E1bzVO2-0006Y8-Vm@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Fix incorrect trigger-property updating in ALTER CONSTRAINT. The code to change the deferrability properties of a foreign-key constraint updated all the associated triggers to match; but a moment's examination of the code that creates those triggers in the first place shows that only some of them should track the constraint's deferrability properties. This leads to odd failures in subsequent exercise of the foreign key, as the triggers are fired at the wrong times. Fix that, and add a regression test comparing the trigger properties produced by ALTER CONSTRAINT with those you get by creating the constraint as-intended to begin with. Per report from James Parks. Back-patch to 9.4 where this ALTER functionality was introduced. Report: <CAJ3Xv+jzJ8iNNUcp4RKW8b6Qp1xVAxHwSXVpjBNygjKxcVuE9w@mail.gmail.com> Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/a522fc3d806ca6ebe3f66e55b3f8cecb85116711 Modified Files -------------- src/backend/commands/tablecmds.c | 31 +++++++++++++--- src/test/regress/expected/alter_table.out | 60 +++++++++++++++++++++++++++++++ src/test/regress/sql/alter_table.sql | 33 +++++++++++++++++ 3 files changed, 119 insertions(+), 5 deletions(-)
В списке pgsql-committers по дате отправления: