Re: Proposal: TRUNCATE TABLE table RESTRICT - Mailing list pgsql-hackers

From Mike Mascari
Subject Re: Proposal: TRUNCATE TABLE table RESTRICT
Date
Msg-id 393FC172.C7959F8D@mascari.com
Whole thread Raw
In response to Re: Proposal: TRUNCATE TABLE table RESTRICT  (Don Baccus <dhogaza@pacifier.com>)
List pgsql-hackers
Don Baccus wrote:
> 
> At 10:43 AM 6/8/00 -0400, Mike Mascari wrote:
...
> > And the Oracle docs state that DML triggers aren't fired
> >when a TRUNCATE is issued, so I didn't think there would be
> >issues there. Could you check?
> 
> It refuses to do the TRUNCATE, whether or not there's a
> "ON DELETE CASCADE" modifier to the references.
> 
> That seems reasonable - it allows one to still say "truncate's
> really fast because it doesn't scan the rows in the table",
> and refuses to break RI constraints.
> 
> All that needs doing is to check for the existence of
> at least one RI trigger on the table that's being truncated,
> and saying "no way, jose" if we want to mimic Oracle in
> this regard.
> 
> TODO item?

Sounds like it to me. Rats...

Mike Mascari

> 
> - Don Baccus, Portland OR <dhogaza@pacifier.com>
>   Nature photos, on-line guides, Pacific Northwest
>   Rare Bird Alert Service and other goodies at
>   http://donb.photo.net.


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: DROP COLUMN status
Next
From: Bruce Momjian
Date:
Subject: Re: Bit strings