Re: Need "InBetween" (not just Before and After) Trigger

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: Matt Doucleff <matt(at)digitalfountain(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Need "InBetween" (not just Before and After) Trigger
Date: 2001-01-15 21:30:12
Message-ID: 28270.979594212@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
> Sort of, but it still isn't sufficient. There's no way to say for certain
> that a later deferred trigger won't send an exception that will roll back
> the transaction. What he'd really need would be something that occurs
> after the deferred trigger queue and after the transaction has committed
> that cannot cause the transaction to rollback (I'm not sure what an
> error condition raised in such a state would do...)

Good point. One possibility is to do the external action outside the
database, perhaps in a daemon process that's listening for NOTIFYs sent
by the trigger. (NOTIFY events are delivered only if the transaction
commits.) You'd need some additional tables to record the actions the
daemon is supposed to take, since NOTIFY alone can't carry much of an
information payload.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message snef 2001-01-15 22:09:26 date/time
Previous Message Anthony E . Greene 2001-01-15 21:26:09 Re: Date help