From: | "Christopher Browne" <cbbrowne(at)gmail(dot)com> |
---|---|
To: | "David Fetter" <david(at)fetter(dot)org> |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Gregory Stark" <stark(at)enterprisedb(dot)com>, Decibel! <decibel(at)decibel(dot)org>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Truncate Triggers |
Date: | 2008-02-02 22:23:39 |
Message-ID: | d6d6637f0802021423v3c88d57dgfd79d621904e2cc6@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Feb 2, 2008 2:43 PM, David Fetter <david(at)fetter(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2008-02-02 22:26:52 | Re: Truncate Triggers |
Previous Message | Oleg Bartunov | 2008-02-02 22:08:50 | Re: Problem with site doc search |