mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +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:
@@ -292,6 +292,33 @@ trigger_out(PG_FUNCTION_ARGS)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* event_trigger_in - input routine for pseudo-type event_trigger.
|
||||
*/
|
||||
Datum
|
||||
event_trigger_in(PG_FUNCTION_ARGS)
|
||||
{
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot accept a value of type event_trigger")));
|
||||
|
||||
PG_RETURN_VOID(); /* keep compiler quiet */
|
||||
}
|
||||
|
||||
/*
|
||||
* event_trigger_out - output routine for pseudo-type event_trigger.
|
||||
*/
|
||||
Datum
|
||||
event_trigger_out(PG_FUNCTION_ARGS)
|
||||
{
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot display a value of type event_trigger")));
|
||||
|
||||
PG_RETURN_VOID(); /* keep compiler quiet */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* language_handler_in - input routine for pseudo-type LANGUAGE_HANDLER.
|
||||
*/
|
||||
|
23
src/backend/utils/cache/syscache.c
vendored
23
src/backend/utils/cache/syscache.c
vendored
@@ -34,6 +34,7 @@
|
||||
#include "catalog/pg_database.h"
|
||||
#include "catalog/pg_default_acl.h"
|
||||
#include "catalog/pg_enum.h"
|
||||
#include "catalog/pg_event_trigger.h"
|
||||
#include "catalog/pg_foreign_data_wrapper.h"
|
||||
#include "catalog/pg_foreign_server.h"
|
||||
#include "catalog/pg_foreign_table.h"
|
||||
@@ -379,6 +380,28 @@ static const struct cachedesc cacheinfo[] = {
|
||||
},
|
||||
256
|
||||
},
|
||||
{EventTriggerRelationId, /* EVENTTRIGGERNAME */
|
||||
EventTriggerNameIndexId,
|
||||
1,
|
||||
{
|
||||
Anum_pg_event_trigger_evtname,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
},
|
||||
8
|
||||
},
|
||||
{EventTriggerRelationId, /* EVENTTRIGGEROID */
|
||||
EventTriggerOidIndexId,
|
||||
1,
|
||||
{
|
||||
ObjectIdAttributeNumber,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
},
|
||||
8
|
||||
},
|
||||
{ForeignDataWrapperRelationId, /* FOREIGNDATAWRAPPERNAME */
|
||||
ForeignDataWrapperNameIndexId,
|
||||
1,
|
||||
|
Reference in New Issue
Block a user