postgresql/src/test/regress
Alvaro Herrera 473ab40c8b Add sql_drop event for event triggers
This event takes place just before ddl_command_end, and is fired if and
only if at least one object has been dropped by the command.  (For
instance, DROP TABLE IF EXISTS of a table that does not in fact exist
will not lead to such a trigger firing).  Commands that drop multiple
objects (such as DROP SCHEMA or DROP OWNED BY) will cause a single event
to fire.  Some firings might be surprising, such as
ALTER TABLE DROP COLUMN.

The trigger is fired after the drop has taken place, because that has
been deemed the safest design, to avoid exposing possibly-inconsistent
internal state (system catalogs as well as current transaction) to the
user function code.  This means that careful tracking of object
identification is required during the object removal phase.

Like other currently existing events, there is support for tag
filtering.

To support the new event, add a new pg_event_trigger_dropped_objects()
set-returning function, which returns a set of rows comprising the
objects affected by the command.  This is to be used within the user
function code, and is mostly modelled after the recently introduced
pg_identify_object() function.

Catalog version bumped due to the new function.

Dimitri Fontaine and Álvaro Herrera
Review by Robert Haas, Tom Lane
2013-03-28 13:05:48 -03:00
..
data Fix GIN to support null keys, empty and null items, and full index scans. 2011-01-07 19:16:24 -05:00
expected Add sql_drop event for event triggers 2013-03-28 13:05:48 -03:00
input Code review for 64-bit-large-object patch. 2012-10-08 18:24:32 -04:00
output Add a materialized view relations. 2013-03-03 18:23:31 -06:00
sql Add sql_drop event for event triggers 2013-03-28 13:05:48 -03:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
GNUmakefile Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Remove remains of old depend target. 2007-01-20 17:16:17 +00:00
parallel_schedule Add a materialized view relations. 2013-03-03 18:23:31 -06:00
pg_regress_main.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_regress.c pg_regress: Allow overriding diff options 2013-01-29 22:59:45 -05:00
pg_regress.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
regress.c Redesign the plancache mechanism for more flexibility and efficiency. 2011-09-16 00:43:52 -04:00
regressplans.sh Tweak regressplans.sh to use any already-set PGOPTIONS. 2000-12-18 02:45:47 +00:00
resultmap Enable compiling with the mingw-w64 32 bit compiler. 2011-12-10 15:35:41 -05:00
serial_schedule Add a materialized view relations. 2013-03-03 18:23:31 -06:00
standby_schedule Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00