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" <tgl@sss.pgh.pa.us>
To: "Rod Taylor" <rbt@zort.ca>
Cc: "Hackers List" <pgsql-hackers@postgresql.org>
Sent: Sunday, May 12, 2002 12:30 PM
Subject: Re: [HACKERS] TRUNCATE
> "Rod Taylor" <rbt@zort.ca> 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
>