On 5/10/07, Jan Strube <[EMAIL PROTECTED]> 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. ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq