deferred triggers?

Started by Benover 17 years ago3 messagesgeneral
Jump to latest
#1Ben
bench@silentmedia.com

In 8.3, is there any way I can have a trigger that fires at commit time,
much like deferred foreign keys? I suspect the answer is "no" but it would
be nice if I'm wrong.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Ben (#1)
Re: deferred triggers?

Ben <bench@silentmedia.com> writes:

In 8.3, is there any way I can have a trigger that fires at commit time,
much like deferred foreign keys?

See CREATE CONSTRAINT TRIGGER ... same mechanism that FKs use ...

regards, tom lane

#3Ben
bench@silentmedia.com
In reply to: Tom Lane (#2)
Re: deferred triggers?

Awesome!

On Fri, 17 Oct 2008, Tom Lane wrote:

Show quoted text

Ben <bench@silentmedia.com> writes:

In 8.3, is there any way I can have a trigger that fires at commit time,
much like deferred foreign keys?

See CREATE CONSTRAINT TRIGGER ... same mechanism that FKs use ...

regards, tom lane