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

From Tom Lane
Subject Re: Triggers on TRUNCATE?
Date
Msg-id 27539.1090853946@sss.pgh.pa.us
Whole thread Raw
In response to Triggers on TRUNCATE?  (Daniel Baldoni <pgsql@lcds.com.au>)
Responses Re: Triggers on TRUNCATE?  (Hannu Krosing <hannu@tm.ee>)
List pgsql-hackers
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.

If you want to fire triggers, just use "DELETE FROM foo".
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Weird...but correct?
Next
From: "Marc G. Fournier"
Date:
Subject: Re: CVS web interface error