mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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:
@@ -1792,6 +1792,26 @@ _equalCreateTrigStmt(const CreateTrigStmt *a, const CreateTrigStmt *b)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalCreateEventTrigStmt(const CreateEventTrigStmt *a, const CreateEventTrigStmt *b)
|
||||
{
|
||||
COMPARE_STRING_FIELD(trigname);
|
||||
COMPARE_SCALAR_FIELD(eventname);
|
||||
COMPARE_NODE_FIELD(funcname);
|
||||
COMPARE_NODE_FIELD(whenclause);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalAlterEventTrigStmt(const AlterEventTrigStmt *a, const AlterEventTrigStmt *b)
|
||||
{
|
||||
COMPARE_STRING_FIELD(trigname);
|
||||
COMPARE_SCALAR_FIELD(tgenabled);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalCreatePLangStmt(const CreatePLangStmt *a, const CreatePLangStmt *b)
|
||||
{
|
||||
@@ -2872,6 +2892,12 @@ equal(const void *a, const void *b)
|
||||
case T_CreateTrigStmt:
|
||||
retval = _equalCreateTrigStmt(a, b);
|
||||
break;
|
||||
case T_CreateEventTrigStmt:
|
||||
retval = _equalCreateEventTrigStmt(a, b);
|
||||
break;
|
||||
case T_AlterEventTrigStmt:
|
||||
retval = _equalAlterEventTrigStmt(a, b);
|
||||
break;
|
||||
case T_CreatePLangStmt:
|
||||
retval = _equalCreatePLangStmt(a, b);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user