Re: Triggers on TRUNCATE? - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Triggers on TRUNCATE?
Date
Msg-id 1090889115.9455.3.camel@fuji.krosing.net
Whole thread Raw
In response to Re: Triggers on TRUNCATE?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Triggers on TRUNCATE?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On E, 2004-07-26 at 17:59, Tom Lane wrote:
> Daniel Baldoni <pgsql@lcds.com.au> writes:
> > Forgive this if it's totally "out there" but I was wondering why there's no
> > support for triggers on a TRUNCATE operation.
> 
> Because the entire point of TRUNCATE is not to scan the table contents.

Maybe he was after statement level triggers ?

We don't support them, and one also can't define a RULE for TRUNCATE -
so the advice would be to use TRUNCATE very sparingly ;)

Btw, does the right to TRUNCATE come with GRANT DELETE, or must one be a
superuser to TRUNCATE ?

---------------
Hannu



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.5 backend crash
Next
From: Justin Clift
Date:
Subject: Re: Improvements to PostgreSQL