Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group