Re: Feature request: Truncate table

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hannu Krosing <hannu(at)tm(dot)ee>, Larry Rosenman <ler(at)lerctr(dot)org>, billy(at)oconnoronline(dot)net, DCorbit(at)connx(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Feature request: Truncate table
Date: 2002-06-13 09:52:09
Message-ID: 3D086B49.A870C581@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne wrote:
>
> > > Hrm - last time I checked it did...
> >
> > Two questions :
> >
> > When was the last time ?
>
> 7.1
>
> > It did what ?
>
> Drops triggers and stuff.
>
> OK, I did a check and it looks like it's fixed in 7.2 at least. Sorry for
> the false alarm...

It has never "dropped triggers and stuff", so there was nothing to fix.
All TRUNCATE TABLE has ever done, since the patch was submitted, was to
truncate the underlying relation file and the associated index files,
and reinitialize the indexes. It has been changed to be disallowed in
transactions involving tables not created in the same transaction, but
that's about it. People have argued that if there are *RI* triggers on a
table, that TRUNCATE should be disallowed, as in Oracle. But TRUNCATE
from inception to date has never dropped triggers...

Mike Mascari
mascarm(at)mascari(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2002-06-13 10:01:14 Re: PostGres Doubt
Previous Message Christopher Kings-Lynne 2002-06-13 09:32:42 Re: Feature request: Truncate table