This patch implements FOR EACH STATEMENT triggers, per my email to
authorBruce Momjian <bruce@momjian.us>
Sat, 23 Nov 2002 03:59:09 +0000 (03:59 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 23 Nov 2002 03:59:09 +0000 (03:59 +0000)
commit1b7f3cc02d6129b678ab651716c19d2bf8f7f6ab
treec9929a24cffcdf4989ca67f3ef42056fe2c2f52e
parentea29b32758bdd293a9b932195db662209bb0ee52
This patch implements FOR EACH STATEMENT triggers, per my email to
-hackers a couple days ago.

Notes/caveats:

        - added regression tests for the new functionality, all
          regression tests pass on my machine

        - added pg_dump support

        - updated PL/PgSQL to support per-statement triggers; didn't
          look at the other procedural languages.

        - there's (even) more code duplication in trigger.c than there
          was previously. Any suggestions on how to refactor the
          ExecXXXTriggers() functions to reuse more code would be
          welcome -- I took a brief look at it, but couldn't see an
          easy way to do it (there are several subtly-different
          versions of the code in question)

        - updated the documentation. I also took the liberty of
          removing a big chunk of duplicated syntax documentation in
          the Programmer's Guide on triggers, and moving that
          information to the CREATE TRIGGER reference page.

        - I also included some spelling fixes and similar small
          cleanups I noticed while making the changes. If you'd like
          me to split those into a separate patch, let me know.

Neil Conway
24 files changed:
doc/src/sgml/plpgsql.sgml
doc/src/sgml/ref/alter_trigger.sgml
doc/src/sgml/ref/create_trigger.sgml
doc/src/sgml/release.sgml
doc/src/sgml/trigger.sgml
src/backend/access/transam/xact.c
src/backend/commands/copy.c
src/backend/commands/tablecmds.c
src/backend/commands/trigger.c
src/backend/executor/execMain.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/parser/gram.y
src/backend/utils/adt/pg_lzcompress.c
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_dump.c
src/include/commands/trigger.h
src/include/nodes/parsenodes.h
src/include/utils/pg_lzcompress.h
src/include/utils/rel.h
src/interfaces/python/pgdb.py
src/pl/plpgsql/src/pl_exec.c
src/test/regress/expected/triggers.out
src/test/regress/sql/triggers.sql