Re: Truncate Triggers - Mailing list pgsql-hackers

From Christopher Browne
Subject Re: Truncate Triggers
Date
Msg-id d6d6637f0802021423v3c88d57dgfd79d621904e2cc6@mail.gmail.com
Whole thread Raw
In response to Re: Truncate Triggers  (David Fetter <david@fetter.org>)
Responses Re: Truncate Triggers  (David Fetter <david@fetter.org>)
List pgsql-hackers
On Feb 2, 2008 2:43 PM, David Fetter <david@fetter.org> 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.

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.
-- 
http://linuxfinances.info/info/linuxdistributions.html
"The definition of insanity is doing the same thing over and over and
expecting different results."  -- assortedly attributed to Albert
Einstein, Benjamin Franklin, Rita Mae Brown, and Rudyard Kipling


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Problem with site doc search
Next
From: David Fetter
Date:
Subject: Re: Truncate Triggers