Re: trigger for TRUNCATE?

Поиск
Список
Период
Сортировка
От Peter Childs
Тема Re: trigger for TRUNCATE?
Дата
Msg-id a2de01dd0801140144s5e35612cw854e79a91ae871a3@mail.gmail.com
обсуждение исходный текст
Ответ на Re: trigger for TRUNCATE?  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-sql


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.

В списке pgsql-sql по дате отправления:

Предыдущее
От: "Marc Mamin"
Дата:
Сообщение: Re: SQL stored function inserting and returning data in a row.
Следующее
От: RDyes@monroehosp.org
Дата:
Сообщение: Unescaping text or binary file