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: 1090889115.9455.3.camel@fuji.krosing.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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 ?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2004-07-27 00:57:58 Re: cvsweb upgraded
Previous Message Tom Lane 2004-07-27 00:37:13 Re: 7.5 backend crash