GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.postgresql.org — 38.2. Writing Event Trigger Functions in C November 19, 2026: PostgreSQL 19 Released!
Development Versions:
devel
38.2. Writing Event Trigger Functions in C #This section describes the low-level details of the interface to an event trigger function. This information is only needed when writing event trigger functions in C. If you are using a higher-level language then these details are handled for you. In most cases you should consider using a procedural language before writing your event triggers in C. The documentation of each procedural language explains how to write an event trigger in that language. Event trigger functions must use the “version 1” function manager interface. When a function is called by the event trigger manager, it is not passed any normal arguments, but it is passed a “context” pointer pointing to a CALLED_AS_EVENT_TRIGGER(fcinfo) which expands to: ((fcinfo)->context != NULL && IsA((fcinfo)->context, EventTriggerData)) If this returns true, then it is safe to cast
typedef struct EventTriggerData
{
NodeTag type;
const char *event; /* event name */
Node *parsetree; /* parse tree */
CommandTag tag; /* command tag */
} EventTriggerData;
where the members are defined as follows:
An event trigger function must return a Submit correctionIf you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |