]> granicus.if.org Git - postgresql/commit
Make new event trigger facility actually do something.
authorRobert Haas <rhaas@postgresql.org>
Fri, 20 Jul 2012 15:38:47 +0000 (11:38 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 20 Jul 2012 15:39:01 +0000 (11:39 -0400)
commit3a0e4d36ebd7f477822d5bae41ba121a40d22ccc
tree323cd89ebb88c51b796b86f17f6efa1db76a761e
parentbe86e3dd5b42c33387ae976c014e6276c9439f7f
Make new event trigger facility actually do something.

Commit 3855968f328918b6cd1401dd11d109d471a54d40 added syntax, pg_dump,
psql support, and documentation, but the triggers didn't actually fire.
With this commit, they now do.  This is still a pretty basic facility
overall because event triggers do not get a whole lot of information
about what the user is trying to do unless you write them in C; and
there's still no option to fire them anywhere except at the very
beginning of the execution sequence, but it's better than nothing,
and a good building block for future work.

Along the way, add a regression test for ALTER LARGE OBJECT, since
testing of event triggers reveals that we haven't got one.

Dimitri Fontaine and Robert Haas
28 files changed:
contrib/pg_stat_statements/pg_stat_statements.c
doc/src/sgml/plpgsql.sgml
doc/src/sgml/ref/create_event_trigger.sgml
src/backend/commands/event_trigger.c
src/backend/commands/extension.c
src/backend/commands/schemacmds.c
src/backend/commands/trigger.c
src/backend/executor/functions.c
src/backend/executor/spi.c
src/backend/tcop/pquery.c
src/backend/tcop/utility.c
src/backend/tsearch/ts_utils.c
src/backend/utils/cache/Makefile
src/backend/utils/cache/evtcache.c [new file with mode: 0644]
src/include/commands/event_trigger.h
src/include/nodes/nodes.h
src/include/port.h
src/include/tcop/utility.h
src/include/utils/evtcache.h [new file with mode: 0644]
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/pl_exec.c
src/pl/plpgsql/src/pl_handler.c
src/pl/plpgsql/src/plpgsql.h
src/port/qsort.c
src/test/regress/expected/event_trigger.out
src/test/regress/input/largeobject.source
src/test/regress/output/largeobject.source
src/test/regress/sql/event_trigger.sql