Full implementation of truncate triggers on CVS HEAD, for Postgres 8.4
Includes various docs, regression tests for PL/pgSQL trigger support,
psql and pg_dump support.
Some further discussion on -hackers required around statement skipping.
Prototype code for that aspect included in this patch, #ifdef'd out.
Most interesting discussion point is the handling of multiple truncate
triggers when we are performing a multi-table TRUNCATE. Please read docs
in patch for details, plus comments.
This includes changes to PL/tcl, PL/perl and PL/python but support in
those languages have not yet been tested, not even a little bit. This
will be performed after review.
Provisional Slony support patch will also be posted to appropriate list.
doc/src/sgml/ref/create_trigger.sgml | 32 +++!
doc/src/sgml/ref/truncate.sgml | 4
doc/src/sgml/trigger.sgml | 32 ++!!
src/backend/commands/tablecmds.c | 126 ++++++++++++++++++
src/backend/commands/trigger.c | 111 ++++++++++++++++
src/backend/parser/gram.y | 1
src/backend/utils/adt/ruleutils.c | 7 +
src/bin/pg_dump/pg_dump.c | 7 +
src/include/catalog/pg_trigger.h | 3
src/include/commands/trigger.h | 31 +!!!
src/include/utils/rel.h | 2
src/pl/plperl/plperl.c | 4
src/pl/plpgsql/src/pl_exec.c | 6
src/pl/plpython/plpython.c | 2
src/pl/tcl/pltcl.c | 2
src/test/regress/expected/truncate.out | 226 ++++++++++++++++++++...
src/test/regress/sql/truncate.sql | 127 ++++++++++++++++++
17 files changed, 672 insertions(+), 51 modifications(!)
pgsql-patches by date
|Next:||From: Tom Lane||Date: 2008-01-30 18:07:50|
|Subject: Re: [PATCHES] Proposed patch: synchronized_scanning GUCvariable |
|Previous:||From: Tom Lane||Date: 2008-01-30 17:22:28|
|Subject: Re: [PATCHES] Proposed patch: synchronized_scanning GUC variable |