Re: Feature proposal: generalizing deferred trigger events - Mailing list pgsql-hackers

From Holger Krug
Subject Re: Feature proposal: generalizing deferred trigger events
Date
Msg-id 20020102191806.A881@dev12.rationalizer.com
Whole thread Raw
In response to Re: Feature proposal: generalizing deferred trigger events  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Jan 02, 2002 at 12:16:14PM -0500, Tom Lane wrote:

Hey, I got an SQL feature for you: One could use those generalized
deferred triggers to implement:

CREATE TEMP TABLE <table> ( ... ) ON COMMIT DELETE ROWS

Simply add a not deferred trigger on insertion to <table>, which
checks if it was already called in the same transaction (using a
hard-coded transaction id as static variable) and if not, adds a
generalized clean-up trigger which truncates <table>. (Shall triggers
ON DELETE for <table> be called in this case or not ?)

-- 
Holger Krug
hkrug@rationalizer.com


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: problems with new vacuum (??)
Next
From: Don Baccus
Date:
Subject: Re: problems with new vacuum (??)