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.

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 EventTriggerData structure. C functions can
check whether they were called from the event trigger manager or
not by executing the macro:

If this returns true, then it is safe to cast fcinfo->context to type EventTriggerData * and make use of the pointed-to
EventTriggerData structure. The
function must not alter
the EventTriggerData structure or any
of the data it points to.

Submit correction

If 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.