On Sat, Feb 02, 2008 at 05:23:39PM -0500, Christopher Browne wrote:
> On Feb 2, 2008 2:43 PM, David Fetter <[EMAIL PROTECTED]> wrote:
> > It still involves DDL-like operations in the sense of changing
> > (for the duration of the query) trigger behavior.
> 
> But that "change of trigger behavior" is still more in the "DML"
> sense than "DDL sense."
> 
> The point of TRUNCATE is that we have an optimization that's
> superior (in some important senses) to "DELETE FROM."
> 
> The differences between TRUNCATE FOO and DELETE FROM FOO do not have
> to do with the one altering the schema for the table.  The schema
> remains the same.

In essence, the schema changes for the duration of the TRUNCATE.  Any
data integrity constraints that triggers used are therefore violated,
and it's DDL-like.  To put it another way, if you want to duplicate
the trigger-suppression behavior, you have to issue DDL.

> I think it would be nice to be able to have more "trigger hooks"
> relating to DDL changes, but I also think that will represent some
> fundamentally more difficult problems being raised than is the case
> for a TRUNCATE trigger.

Are they really?

Cheers,
David.
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: [EMAIL PROTECTED]

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

---------------------------(end of broadcast)---------------------------
TIP 1: 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