Transaction Triggers!

Started by Omkar Rathalmost 23 years ago3 messagesgeneral
Jump to latest
#1Omkar Rath
orath@cisco.com

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.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Omkar Rath (#1)
Re: Transaction Triggers!

"Omkar Rath" <orath@cisco.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

#3Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Omkar Rath (#1)
Re: Transaction Triggers!

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.