mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +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:
@ -24,6 +24,7 @@
|
||||
#include "commands/conversioncmds.h"
|
||||
#include "commands/dbcommands.h"
|
||||
#include "commands/defrem.h"
|
||||
#include "commands/event_trigger.h"
|
||||
#include "commands/extension.h"
|
||||
#include "commands/proclang.h"
|
||||
#include "commands/schemacmds.h"
|
||||
@ -77,6 +78,10 @@ ExecRenameStmt(RenameStmt *stmt)
|
||||
RenameForeignServer(stmt->subname, stmt->newname);
|
||||
break;
|
||||
|
||||
case OBJECT_EVENT_TRIGGER:
|
||||
RenameEventTrigger(stmt->subname, stmt->newname);
|
||||
break;
|
||||
|
||||
case OBJECT_FUNCTION:
|
||||
RenameFunction(stmt->object, stmt->objarg, stmt->newname);
|
||||
break;
|
||||
@ -534,6 +539,10 @@ ExecAlterOwnerStmt(AlterOwnerStmt *stmt)
|
||||
AlterForeignServerOwner(strVal(linitial(stmt->object)), newowner);
|
||||
break;
|
||||
|
||||
case OBJECT_EVENT_TRIGGER:
|
||||
AlterEventTriggerOwner(strVal(linitial(stmt->object)), newowner);
|
||||
break;
|
||||
|
||||
default:
|
||||
elog(ERROR, "unrecognized AlterOwnerStmt type: %d",
|
||||
(int) stmt->objectType);
|
||||
|
Reference in New Issue
Block a user