Re: trigger for TRUNCATE?
От
Erik Jones
Тема
Re: trigger for TRUNCATE?
Дата
Msg-id
D491CA2D-775F-4F5F-8DC6-8B5088E82F4D@myemma.com
Ответ на
Re: trigger for TRUNCATE? (Richard Huxton)
Список
Дерево обсуждения
Re: trigger for TRUNCATE? Chris Browne <cbbrowne@acm.org>
Re: trigger for TRUNCATE? "Pavel Stehule" <pavel.stehule@gmail.com>
Re: trigger for TRUNCATE? Gerardo Herzig <gherzig@fmed.uba.ar>
Re: trigger for TRUNCATE? Alvaro Herrera <alvherre@commandprompt.com>
Re: trigger for TRUNCATE? Tom Lane <tgl@sss.pgh.pa.us>
Re: trigger for TRUNCATE? Alvaro Herrera <alvherre@commandprompt.com>
Re: trigger for TRUNCATE? Tom Lane <tgl@sss.pgh.pa.us>
Re: trigger for TRUNCATE? Richard Huxton <dev@archonet.com>
Re: trigger for TRUNCATE? Simon Riggs <simon@2ndquadrant.com>
Re: trigger for TRUNCATE? Bruce Momjian <bruce@momjian.us>
Re: trigger for TRUNCATE? "Peter Childs" <peterachilds@gmail.com>
Re: trigger for TRUNCATE? Erik Jones <erik@myemma.com>
Re: trigger for TRUNCATE? Gerardo Herzig <gherzig@fmed.uba.ar>
On Jan 11, 2008, at 2:24 AM, Richard Huxton wrote: > Tom Lane wrote: >> Alvaro Herrera writes: >>> My thinking is that a TRUNCATE trigger is a per-statement trigger >>> which >>> doesn't have access to the set of deleted rows (Replicator uses >>> it that >>> way -- we replicate the truncate action, and replay it on the >>> replica). >>> In that way it would be different from a per-statement trigger for >>> DELETE. >> Ah, right. I was thinking in terms of having TRUNCATE actually >> fire the >> existing ON DELETE-type triggers, but that's not really helpful >> --- you'd >> need a separate trigger-event type. So we could just say by fiat >> that >> an ON TRUNCATE trigger doesn't get any rowset information, even >> after we >> add that for the other types of statement-level triggers. > > I've always considered TRUNCATE to be DDL rather than DML. I > mentally group it with DROP TABLE rather than DELETE> Not that DDL statement triggers wouldn't be just as useful for replication. Erik Jones DBA | Emma® erik@myemma.com 800.595.4401 or 615.292.5888 615.292.0777 (fax) Emma helps organizations everywhere communicate & market in style. Visit us online at http://www.myemma.com
В списке pgsql-sql по дате отправления
От: Pavel Stehule
Дата: