On 11/01/2008, Simon Riggs <[EMAIL PROTECTED]> 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 via email to