Thread: pgsql-server/ oc/src/sgml/plpgsql.sgml oc/src/ ...
pgsql-server/ oc/src/sgml/plpgsql.sgml oc/src/ ...
From
momjian@postgresql.org (Bruce Momjian - CVS)
Date:
CVSROOT: /cvsroot Module name: pgsql-server Changes by: momjian@postgresql.org 02/11/22 22:59:09 Modified files: doc/src/sgml : plpgsql.sgml release.sgml trigger.sgml doc/src/sgml/ref: alter_trigger.sgml create_trigger.sgml src/backend/access/transam: xact.c src/backend/commands: copy.c tablecmds.c trigger.c src/backend/executor: execMain.c src/backend/nodes: copyfuncs.c equalfuncs.c src/backend/parser: gram.y src/backend/utils/adt: pg_lzcompress.c src/bin/pg_dump: pg_backup_archiver.c pg_dump.c src/include/commands: trigger.h src/include/nodes: parsenodes.h src/include/utils: pg_lzcompress.h 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 Log message: 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
> Log message: > This patch implements FOR EACH STATEMENT triggers, per my email to > -hackers a couple days ago. Wow - you rock Neil! BTW, does making the default 'STATEMENT' if they do not specify a 'FOR EACH' clause break previous behaviour? Chris
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes: > BTW, does making the default 'STATEMENT' if they do not specify a > 'FOR EACH' clause break previous behaviour? No, it doesn't -- the previous behavior didn't allow a default (i.e. either FOR EACH ROW or FOR EACH STATEMENT had to be specified, with STATEMENT producing an error). Cheers, Neil -- Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC