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 — 40.3. Writing Event Trigger Functions in C November 19, 2026: PostgreSQL 19 Released!
Development Versions:
devel
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead. 40.3. Writing Event Trigger Functions in CThis 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 */
const char *tag; /* command tag */
} EventTriggerData;
where the members are defined as follows:
An event trigger function must return a |
| 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. |