Skip site navigation (1) Skip section navigation (2)

Re: Triggers on TRUNCATE?

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Daniel Baldoni <pgsql(at)lcds(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Triggers on TRUNCATE?
Date: 2004-07-27 00:45:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On E, 2004-07-26 at 17:59, Tom Lane wrote:
> 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.

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 ?


In response to


pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2004-07-27 00:57:58
Subject: Re: cvsweb upgraded
Previous:From: Tom LaneDate: 2004-07-27 00:37:13
Subject: Re: 7.5 backend crash

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group