mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
Syntax support and documentation for event triggers.
They don't actually do anything yet; that will get fixed in a follow-on commit. But this gets the basic infrastructure in place, including CREATE/ALTER/DROP EVENT TRIGGER; support for COMMENT, SECURITY LABEL, and ALTER EXTENSION .. ADD/DROP EVENT TRIGGER; pg_dump and psql support; and documentation for the anticipated initial feature set. Dimitri Fontaine, with review and a bunch of additional hacking by me. Thom Brown extensively reviewed earlier versions of this patch set, but there's not a whole lot of that code left in this commit, as it turns out.
This commit is contained in:
@@ -1113,6 +1113,7 @@ typedef enum ObjectType
|
||||
OBJECT_CONVERSION,
|
||||
OBJECT_DATABASE,
|
||||
OBJECT_DOMAIN,
|
||||
OBJECT_EVENT_TRIGGER,
|
||||
OBJECT_EXTENSION,
|
||||
OBJECT_FDW,
|
||||
OBJECT_FOREIGN_SERVER,
|
||||
@@ -1731,6 +1732,32 @@ typedef struct CreateTrigStmt
|
||||
} CreateTrigStmt;
|
||||
|
||||
/* ----------------------
|
||||
* Create EVENT TRIGGER Statement
|
||||
* ----------------------
|
||||
*/
|
||||
typedef struct CreateEventTrigStmt
|
||||
{
|
||||
NodeTag type;
|
||||
char *trigname; /* TRIGGER's name */
|
||||
char *eventname; /* event's identifier */
|
||||
List *whenclause; /* list of DefElems indicating filtering */
|
||||
List *funcname; /* qual. name of function to call */
|
||||
} CreateEventTrigStmt;
|
||||
|
||||
/* ----------------------
|
||||
* Alter EVENT TRIGGER Statement
|
||||
* ----------------------
|
||||
*/
|
||||
typedef struct AlterEventTrigStmt
|
||||
{
|
||||
NodeTag type;
|
||||
char *trigname; /* TRIGGER's name */
|
||||
char tgenabled; /* trigger's firing configuration WRT
|
||||
* session_replication_role */
|
||||
} AlterEventTrigStmt;
|
||||
|
||||
/* ----------------------
|
||||
* Create/Drop PROCEDURAL LANGUAGE Statements
|
||||
* Create PROCEDURAL LANGUAGE Statements
|
||||
* ----------------------
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user