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