pgsql: Fix AfterTriggerSaveEvent to use a test and elog, not just

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix AfterTriggerSaveEvent to use a test and elog, not just
Дата
Msg-id 20091027201504.B634C753FB7@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Fix AfterTriggerSaveEvent to use a test and elog, not just Assert, to check
that it's called within an AfterTriggerBeginQuery/AfterTriggerEndQuery pair.
The RI cascade triggers suppress that overhead on the assumption that they
are always run non-deferred, so it's possible to violate the condition if
someone mistakenly changes pg_trigger to mark such a trigger deferred.
We don't really care about supporting that, but throwing an error instead
of crashing seems desirable.  Per report from Marcelo Costa.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
    pgsql/src/backend/commands:
        trigger.c (r1.177.4.6 -> r1.177.4.7)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/trigger.c?r1=1.177.4.6&r2=1.177.4.7)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix AfterTriggerSaveEvent to use a test and elog, not just
Следующее
От: mkz@pgfoundry.org (User Mkz)
Дата:
Сообщение: plproxy - plproxy: geterrcode(): Switch memory context to work around