Re: Transaction Triggers!

Lists: pgsql-general
From: "Omkar Rath" <orath(at)cisco(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Transaction Triggers!
Date: 2003-05-19 21:51:13
Message-ID: E58F685255415A4EB2D4B8A02AEF32E304C284BD@evvbu-exchange.cisco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Does Postgres triggers have an "after commit" clause or plans to do so
(in what release)? If NOT, then is there any way for developer's to have
an "after-commit-do" mechanism?

TIA,

Omkar Rath
Software Engineer
Cisco' Systems Inc.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Omkar Rath" <orath(at)cisco(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Transaction Triggers!
Date: 2003-05-25 03:31:28
Message-ID: 2996.1053833488@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

"Omkar Rath" <orath(at)cisco(dot)com> writes:
> Does Postgres triggers have an "after commit" clause or plans to do so

Such a thing sounds like a complete contradiction in terms to me. What
happens if you get an error in the "after commit" operation? You can't
roll back the transaction, it's already committed. Also, my
understanding of "transaction commit" is that it means all the actions
of the transaction are done and guaranteed not to be lost; which is
hardly possible to guarantee if some are not done yet.

> If NOT, then is there any way for developer's to have
> an "after-commit-do" mechanism?

Your application can do whatever it likes ... recognizing that it has no
guarantees about completion.

regards, tom lane


From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Omkar Rath <orath(at)cisco(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Transaction Triggers!
Date: 2003-05-25 16:26:49
Message-ID: 20030525092547.B35205-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


On Mon, 19 May 2003, Omkar Rath wrote:

> Does Postgres triggers have an "after commit" clause or plans to do so
> (in what release)? If NOT, then is there any way for developer's to have
> an "after-commit-do" mechanism?

The closest I can think of might be some kind of listen/notify solution.