postgresql/src/include
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
..
access Allow I/O reliability checks using 16-bit checksums 2013-03-22 13:54:07 +00:00
bootstrap Update copyrights for 2013 2013-01-01 17:15:01 -05:00
catalog Add sql_drop event for event triggers 2013-03-28 13:05:48 -03:00
commands Add sql_drop event for event triggers 2013-03-28 13:05:48 -03:00
common Move relpath() to libpgcommon 2013-02-21 22:46:17 -03:00
datatype Update copyrights for 2013 2013-01-01 17:15:01 -05:00
executor Add a materialized view relations. 2013-03-03 18:23:31 -06:00
foreign Support writable foreign tables. 2013-03-10 14:16:02 -04:00
lib Update copyrights for 2013 2013-01-01 17:15:01 -05:00
libpq Move pqsignal() to libpgport. 2013-03-17 12:06:42 -04:00
mb Add noreturn attributes to some error reporting functions 2013-02-12 07:13:22 -05:00
nodes Support writable foreign tables. 2013-03-10 14:16:02 -04:00
optimizer Redo postgres_fdw's planner code so it can handle parameterized paths. 2013-03-21 19:44:32 -04:00
parser Fix problems with incomplete attempt to prohibit OIDS with MVs. 2013-03-22 13:27:34 -05:00
port Add URLs to document why DLLIMPORT is needed on Windows. 2012-11-07 15:01:25 -05:00
portability Update copyrights for 2013 2013-01-01 17:15:01 -05:00
postmaster Fix background workers for EXEC_BACKEND 2013-01-02 12:01:14 -03:00
regex Re-implement extraction of fixed prefixes from regular expressions. 2012-07-10 14:54:37 -04:00
replication Fix more issues with cascading replication and timeline switches. 2013-01-23 10:19:20 +02:00
rewrite Get rid of any toast table when converting a table to a view. 2013-03-03 19:05:47 -05:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Allow I/O reliability checks using 16-bit checksums 2013-03-22 13:54:07 +00:00
tcop Add a materialized view relations. 2013-03-03 18:23:31 -06:00
tsearch Update copyrights for 2013 2013-01-01 17:15:01 -05:00
utils Add sql_drop event for event triggers 2013-03-28 13:05:48 -03:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Move ExceptionalCondition back to postgres.h 2013-02-18 18:53:32 -03:00
fmgr.h Add infrastructure for storing a VARIADIC ANY function's VARIADIC flag. 2013-01-21 20:26:15 -05:00
funcapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getaddrinfo.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getopt_long.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Install headers from the new src/include/common subdirectory. 2013-02-26 15:27:30 -05:00
miscadmin.h Revoke bc5334d867 2013-03-28 09:18:02 +00:00
pg_config.h.in Improve handling of ereport(ERROR) and elog(ERROR). 2013-01-13 18:40:09 -05:00
pg_config.h.win32 Improve handling of ereport(ERROR) and elog(ERROR). 2013-01-13 18:40:09 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pg_trace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pgstat.h Split pgstat file in smaller pieces 2013-02-18 18:12:52 -03:00
pgtar.h Move tar function headers to pgtar.h 2013-01-02 20:34:08 +01:00
pgtime.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
port.h initdb needs pqsignal() even on Windows. 2013-03-17 15:19:47 -04:00
postgres.h Move ExceptionalCondition back to postgres.h 2013-02-18 18:53:32 -03:00
postgres_ext.h Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
postgres_fe.h Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
rusagestub.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
windowapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00