Re: Deferred triggers?

Поиск
Список
Период
Сортировка
От Guy Rouillier
Тема Re: Deferred triggers?
Дата
Msg-id CC1CF380F4D70844B01D45982E671B239E8A81@mtxexch01.add0.masergy.com
обсуждение исходный текст
Ответ на Deferred triggers?  (CSN <cool_screen_name90001@yahoo.com>)
Список pgsql-general
CSN wrote:
> Perhaps another possible feature request! I've looked
> through the docs and it doesn't appear that it's
> possible to create deferred triggers - i.e. they don't
> get called unless the current transaction commits.

The semantics of such a thing appear to be indeterminate.  What happens
if something in the trigger would have caused the original transaction
to fail?  Most people would expect all changes made by the original
transaction, as well as those made by the trigger, to be rolled back.
Using deferred triggers as you've defined it would then require chainged
transactions, which could get very messy.

> (My understanding
> is that they currently get called immediately whether or not there is
> a transaction in progress.)

There is always a transaction in progress.

--
Guy Rouillier


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

Предыдущее
От: "Cristian Prieto"
Дата:
Сообщение: Re: ECPG examples...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ODBC and inappropriate select *