pgsql: Fix trigger WHEN conditions when both BEFORE and AFTER triggers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix trigger WHEN conditions when both BEFORE and AFTER triggers
Дата
Msg-id E1QvGJs-0002oT-Rv@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix trigger WHEN conditions when both BEFORE and AFTER triggers exist.

Due to tuple-slot mismanagement, evaluation of WHEN conditions for AFTER
ROW UPDATE triggers could crash if there had been a BEFORE ROW trigger
fired for the same update.  Fix by not trying to overload the use of
estate->es_trig_tuple_slot.  Per report from Yoran Heling.

Back-patch to 9.0, when trigger WHEN conditions were introduced.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b33f78df17c32364d51f6e5128f8d81d7d3013a2

Modified Files
--------------
src/backend/commands/trigger.c         |    6 +++---
src/backend/executor/execMain.c        |    1 +
src/backend/executor/execUtils.c       |    1 +
src/include/nodes/execnodes.h          |    3 ++-
src/test/regress/expected/triggers.out |   29 +++++++++++++++++++++++++++++
src/test/regress/sql/triggers.sql      |   26 ++++++++++++++++++++++++++
6 files changed, 62 insertions(+), 4 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix trigger WHEN conditions when both BEFORE and AFTER triggers
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: Simplify errno generating in thread testing program.