Re: Feature proposal: generalizing deferred trigger events

From: Holger Krug <hkrug(at)rationalizer(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Feature proposal: generalizing deferred trigger events
Date: 2002-01-02 18:18:06
Message-ID: 20020102191806.A881@dev12.rationalizer.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)rationalizer(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 2002-01-02 18:34:35 Re: problems with new vacuum (??)
Previous Message Bruce Momjian 2002-01-02 18:13:32 Re: problems with new vacuum (??)