Re: Triggers on TRUNCATE?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Baldoni <pgsql(at)lcds(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Triggers on TRUNCATE?
Date: 2004-07-26 14:59:06
Message-ID: 27539.1090853946@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Daniel Baldoni <pgsql(at)lcds(dot)com(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2004-07-26 15:34:56 Re: CVS web interface error
Previous Message Tom Lane 2004-07-26 14:46:56 Re: Weird...but correct?