Re: Truncate Triggers

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: Truncate Triggers
Дата
Msg-id 37ed240d0801251631w14b2a5dbq2c1c9cb7f8839cb4@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Truncate Triggers  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
On Jan 26, 2008 8:14 AM, Gregory Stark <stark@enterprisedb.com> wrote:
> This two-faced personality is just why we're facing this problem. It looks to
> users like DML but it under the hood it behaves just like DDL.
>

Agreed that it looks like DML.  Speaking as a user, I came away from
the documentation thinking that "TRUNCATE foo;" was just a quicker (to
type as well as to run) alternative to "DELETE * FROM foo;".  Plus it
has the handy quality of being able to empty multiple tables in the
one command.

> I think there are two strategies here. Either we paper over the DDLishness by
> making it look as much as possible like DML. It'll never be perfect but we'll
> be as friendly as we can for users. That might just make the DDLishness pop up
> at all the more surprising moments and be all that much harder to explain
> though.
>
> Or we can just declare it DDL and put a warning in the documentation that
> while it may sound like it's DML it is in fact better thought of as a shortcut
> for doing DROP and CREATE and should be used as such.
>

It's my humble opinion that the analogy to DROP + CREATE does need to
be made more clear.

Cheers
BJ


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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: we have out func for typecast, but we missing this read function
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Truncate Triggers