Re: Making AFTER triggers act properly in PL functions - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: Making AFTER triggers act properly in PL functions
Date
Msg-id 20040907143935.A14494@megazone.bigpanda.com
Whole thread Raw
In response to Making AFTER triggers act properly in PL functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Making AFTER triggers act properly in PL functions
List pgsql-hackers
On Tue, 7 Sep 2004, Tom Lane wrote:

> * EndQuery processes and discards immediate-mode AFTER trigger events for the
> current query.  Any remaining events (ie, DEFERRED triggers) are appended
> to the current (sub)transaction's list of pending deferred triggers.
> Note that even inside a subtransaction, we can discard immediate-mode
> events.
>
> * EndXact and DeferredTriggerSetState continue to act the same as before.
> In particular, DeferredTriggerSetState need pay no attention to trigger
> events that are still in lists belonging to open queries; those events
> aren't ready to fire yet.
>
> Comments?

If I'm reading the above correctly, I think DeferredTriggerSetState may
need to change a little if EndQuery works on a separate list of triggers
because I believe set constraints immediate currently depends on EndQuery
going over the entire list of saved deferred triggers.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Making AFTER triggers act properly in PL functions
Next
From: Josh Berkus
Date:
Subject: Why does pg_stat_activity Truncate Queries?