From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Make new event trigger facility actually do something. |
Date: | 2012-07-20 15:40:16 |
Message-ID: | E1SsFJQ-0006bJ-9V@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/3a0e4d36ebd7f477822d5bae41ba121a40d22ccc
Modified Files
--------------
contrib/pg_stat_statements/pg_stat_statements.c | 17 +-
doc/src/sgml/plpgsql.sgml | 69 +++++-
doc/src/sgml/ref/create_event_trigger.sgml | 6 -
src/backend/commands/event_trigger.c | 337 +++++++++++++++++-----
src/backend/commands/extension.c | 4 +-
src/backend/commands/schemacmds.c | 4 +-
src/backend/commands/trigger.c | 2 +-
src/backend/executor/functions.c | 4 +-
src/backend/executor/spi.c | 4 +-
src/backend/tcop/pquery.c | 5 +-
src/backend/tcop/utility.c | 197 +++++++++++---
src/backend/tsearch/ts_utils.c | 10 +-
src/backend/utils/cache/Makefile | 4 +-
src/backend/utils/cache/evtcache.c | 242 ++++++++++++++++
src/include/commands/event_trigger.h | 18 ++
src/include/nodes/nodes.h | 1 +
src/include/port.h | 1 +
src/include/tcop/utility.h | 20 +-
src/include/utils/evtcache.h | 34 +++
src/pl/plpgsql/src/pl_comp.c | 54 +++-
src/pl/plpgsql/src/pl_exec.c | 93 +++++++
src/pl/plpgsql/src/pl_handler.c | 23 ++-
src/pl/plpgsql/src/plpgsql.h | 15 +-
src/port/qsort.c | 9 +
src/test/regress/expected/event_trigger.out | 38 ++-
src/test/regress/input/largeobject.source | 16 +
src/test/regress/output/largeobject.source | 20 ++
src/test/regress/sql/event_trigger.sql | 39 ++-
28 files changed, 1088 insertions(+), 198 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-07-20 17:11:24 | pgsql: Fix whole-row Var evaluation to cope with resjunk columns (again |
Previous Message | Jan Urbański | 2012-07-20 07:13:14 | Re: Re: [COMMITTERS] pgsql: Fix mapping of PostgreSQL encodings to Python encodings. |