Re: Proposal for db level triggers - Mailing list pgsql-hackers

From James Mansion
Subject Re: Proposal for db level triggers
Date
Msg-id 47D9A73A.2030806@mansionfamily.plus.com
Whole thread Raw
In response to Proposal for db level triggers  (James Mansion <james@mansionfamily.plus.com>)
Responses Re: Proposal for db level triggers
Re: Proposal for db level triggers
List pgsql-hackers
James Mansion wrote:
> In usage:
>
> AFTER START clears counters and flags.
> UPDATE triggers on data set counters and flags.
> BEFORE COMMIT examines the counters and flags and performs any final 
> validation or
> adjustments (or external events such as sending a MoM message)
>
I'd like to point out also that AFTER CONNECT is a good opportunity to 
CREATE TEMP TABLE (be
nice if a global temp table definition could be persisted and 
automatically duplicated into each session, but
never mind).

And if we use data update triggers to insert into a DELETE ROWS temp 
table or an in-memory data
structure, the BEFORE COMMIT trigger is the place to do a bulk copy into 
real table(s) or combine
rows into a BLOb in an audit table.

James



pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: aclitem out/in don't "work"
Next
From: ITAGAKI Takahiro
Date:
Subject: PROC_VACUUM_FOR_WRAPAROUND doesn't work expectedly