From: Peter Childs <peterachilds@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: trigger for TRUNCATE?
Date: Mon, 14 Jan 2008 09:44:58 +0000
Message-ID: <a2de01dd0801140144s5e35612cw854e79a91ae871a3@mail.gmail.com> (raw)
In-Reply-To: <1200069700.4266.1156.camel@ebony.site>
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>
<478727C3.3090301@archonet.com>
<1200069700.4266.1156.camel@ebony.site>
On 11/01/2008, Simon Riggs <simon@2ndquadrant.com> wrote:
>
> On Fri, 2008-01-11 at 08:24 +0000, Richard Huxton wrote:
>
> > I've always considered TRUNCATE to be DDL rather than DML. I mentally
> > group it with DROP TABLE rather than DELETE>
>
> DDL/DML probably isn't the right split, since its then arguable as to
> which group of commands it belongs in.
>
> I see we have 3 types of commands:
>
> 1. Commands that alter the rows in the table
> e.g. UPDATE, DELETE, INSERT + TRUNCATE is clearly part of this group
I'm not sure Truncate currently 100% fits into this group but I think it
should, ought to, or even might.
2. Commands that change the shape of a table
> e.g. ALTER TABLE add/drop column, change type, constraints etc
Create table, drop table, foreign keys, unique indexes, and (currently)
truncate (in that is currently the same as a drop followed by a create) also
fit into this group
3. Commands that change the environment of a table
> e.g. foreign keys, indexes, grants, set fillfactor, ANALYZE, VACUUM,
> CLUSTER etc
>
ie commands that don't effect the shape of the table or the data in the
table only the speed and security or the table so foreign keys don't really
fit in this class nor do unique indexes.
Peter.
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: peterachilds@gmail.com
Subject: Re: trigger for TRUNCATE?
In-Reply-To: <a2de01dd0801140144s5e35612cw854e79a91ae871a3@mail.gmail.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