pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Gerardo Herzig <gherzig@fmed.uba.ar>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Chris Browne <cbbrowne@acm.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: trigger for TRUNCATE?
Date: Fri, 11 Jan 2008 08:24:35 +0000
Message-ID: <478727C3.3090301@archonet.com> (raw)
In-Reply-To: <9563.1199992524@sss.pgh.pa.us>
References: <4783BEA9.3020507@fmed.uba.ar>
<60tzloyr0u.fsf@dba2.int.libertyrms.com>
<162867790801081338n237497efpecffaa255253274d@mail.gmail.com>
<47864A6B.3070902@fmed.uba.ar>
<20080110171027.GK6465@alvh.no-ip.org>
<8003.1199986734@sss.pgh.pa.us>
<20080110174705.GO6465@alvh.no-ip.org>
<9563.1199992524@sss.pgh.pa.us>
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> My thinking is that a TRUNCATE trigger is a per-statement trigger which
>> doesn't have access to the set of deleted rows (Replicator uses it that
>> way -- we replicate the truncate action, and replay it on the replica).
>> In that way it would be different from a per-statement trigger for
>> DELETE.
>
> Ah, right. I was thinking in terms of having TRUNCATE actually fire the
> existing ON DELETE-type triggers, but that's not really helpful --- you'd
> need a separate trigger-event type. So we could just say by fiat that
> an ON TRUNCATE trigger doesn't get any rowset information, even after we
> add that for the other types of statement-level triggers.
I've always considered TRUNCATE to be DDL rather than DML. I mentally
group it with DROP TABLE rather than DELETE>
--
Richard Huxton
Archonet Ltd
view thread (16+ messages) latest in thread
Message-ID: <478727C3.3090301@archonet.com> Permalink: ../478727C3.3090301@archonet.com/ Also on: postgresql.org/message-id/478727C3.3090301@archonet.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-sql@postgresql.org Cc: dev@archonet.com, tgl@sss.pgh.pa.us, alvherre@commandprompt.com, gherzig@fmed.uba.ar, pavel.stehule@gmail.com, cbbrowne@acm.org Subject: Re: trigger for TRUNCATE? In-Reply-To: <478727C3.3090301@archonet.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox