Re: TRUNCATE question
От | Tom Lane |
---|---|
Тема | Re: TRUNCATE question |
Дата | |
Msg-id | 16371.996807857@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: TRUNCATE question (Mike Mascari <mascarm@mascari.com>) |
Ответы |
Re: TRUNCATE question
|
Список | pgsql-hackers |
Mike Mascari <mascarm@mascari.com> writes: > Christopher Kings-Lynne wrote: >> Is TRUNCATE supposed to be equivalent to DELETE FROM blah? >> >> Because I notice that DELETE triggers are not called when you truncate a >> table... Isn't that a bad thing? > It's supposed to work that way - same as Oracle. AFAICT, the whole point of TRUNCATE is to skip all the fancy stuff like delete triggers and just zero the table. Irreversibly. If you don't like it, don't use it... Perhaps TRUNCATE should require superuser privilege, just to protect people from themselves? Not that the DBAs are necessarily any smarter than anyone else, but at least they're supposed to know what they're doing. regards, tom lane
В списке pgsql-hackers по дате отправления: