Re: Need "InBetween" (not just Before and After) Trigger

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Need "InBetween" (not just Before and After) Trigger
Дата
Msg-id 28270.979594212@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Need "InBetween" (not just Before and After) Trigger  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> Sort of, but it still isn't sufficient.  There's no way to say for certain
> that a later deferred trigger won't send an exception that will roll back
> the transaction.  What he'd really need would be something that occurs
> after the deferred trigger queue and after the transaction has committed
> that cannot cause the transaction to rollback (I'm not sure what an
> error condition raised in such a state would do...)

Good point.  One possibility is to do the external action outside the
database, perhaps in a daemon process that's listening for NOTIFYs sent
by the trigger.  (NOTIFY events are delivered only if the transaction
commits.)  You'd need some additional tables to record the actions the
daemon is supposed to take, since NOTIFY alone can't carry much of an
information payload.

            regards, tom lane

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

Предыдущее
От: "Anthony E . Greene"
Дата:
Сообщение: Re: Date help
Следующее
От: "Mike Miller"
Дата:
Сообщение: Re: problem running initdb