The only time I can think of that a FORCE type mechanism would be
allowed would be internal functions.  Perhaps a new cluster (copy
data, truncate table, copy data back sorted).

Internal stuff can call heap_truncate() directly rather than going
through TruncateRelation.

A user style force is to simply drop all rules, foreign keys,
triggers, etc -- do the action -- re-apply constraints.  Anything else
could mean their data isn't consistent.

--
Rod
----- Original Message -----
From: "Tom Lane" <[EMAIL PROTECTED]>
To: "Rod Taylor" <[EMAIL PROTECTED]>
Cc: "Hackers List" <[EMAIL PROTECTED]>
Sent: Sunday, May 12, 2002 12:30 PM
Subject: Re: [HACKERS] TRUNCATE


> "Rod Taylor" <[EMAIL PROTECTED]> writes:
> > I'm thinking it should check for an on delete rule as well as user
> > triggers.
>
> Seems reasonable to me.
>
> Should there be a "FORCE" option to override these checks and do it
> anyway?  Or is that just asking for trouble?
>
> regards, tom lane
>


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to