pgsql: Fix sloppy usage of TRIGGER_FIRED_BEFORE/TRIGGER_FIRED_AFTER.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix sloppy usage of TRIGGER_FIRED_BEFORE/TRIGGER_FIRED_AFTER.
Дата
Msg-id E1P4Gk6-0002sP-O4@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix sloppy usage of TRIGGER_FIRED_BEFORE/TRIGGER_FIRED_AFTER.

Various places were testing TRIGGER_FIRED_BEFORE() where what they really
meant was !TRIGGER_FIRED_AFTER(), or vice versa.  This needs to be cleaned
up because there are about to be more than two possible states.

We might want to note this in the 9.1 release notes as something for
trigger authors to double-check.

For consistency's sake I also changed some places that assumed that
TRIGGER_FIRED_FOR_ROW and TRIGGER_FIRED_FOR_STATEMENT are necessarily
mutually exclusive; that's not in immediate danger of breaking, but
it's still sloppier than it should be.

Extracted from Dean Rasheed's patch for triggers on views.  I'm committing
this separately since it's an identifiable separate issue, and is the
only reason for the patch to touch most of these particular files.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=caaf2e84698940c093e6cf6203014883e4fb18c5

Modified Files
--------------
contrib/spi/autoinc.c               |    6 +++---
contrib/spi/insert_username.c       |    6 +++---
contrib/spi/moddatetime.c           |    8 ++++----
contrib/spi/refint.c                |    8 ++++----
contrib/spi/timetravel.c            |    6 +++---
src/backend/utils/adt/tsvector_op.c |    6 +++---
src/pl/plpgsql/src/pl_exec.c        |    4 ++--
src/pl/plpython/plpython.c          |    1 -
src/test/regress/regress.c          |    6 +++---
9 files changed, 25 insertions(+), 26 deletions(-)


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

Предыдущее
От: andrewd@pgfoundry.org (User Andrewd)
Дата:
Сообщение: pgbuildfarm - client-code: Report git-cvsserver changesets correctly
Следующее
От: andrewd@pgfoundry.org (User Andrewd)
Дата:
Сообщение: pgbuildfarm - client-code: Fix a typo, and make update mode the default