Re: Invoke trigger after commit

Поиск
Список
Период
Сортировка
От Alexander Staubo
Тема Re: Invoke trigger after commit
Дата
Msg-id 88daf38c0705100443i378cd3f7g8a43a076da7cd307@mail.gmail.com
обсуждение исходный текст
Ответ на Invoke trigger after commit  (Jan Strube <js@deriva.de>)
Список pgsql-general
On 5/10/07, Jan Strube <js@deriva.de> wrote:
> is there a way to invoke a trigger only if the current transaction is
> committed?
> The problem is that my trigger does some kind of logging outside the
> database and therefore must not be invoked if the transaction is rolled
> back.

PostgreSQL does not implement a kind of "on commit" trigger, but you
can simulate them using "notify" and "listen", which are
transactional:

  http://www.postgresql.org/docs/8.2/interactive/sql-notify.html

Alexander.

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

Предыдущее
От: Jan Strube
Дата:
Сообщение: Invoke trigger after commit
Следующее
От: Sim Zacks
Дата:
Сообщение: Re: Invoke trigger after commit