igger
    manager or not by executing the macro:
</P><PRE
CLASS="PROGRAMLISTING"
>CALLED_AS_TRIGGER(fcinfo)</PRE
><P>
    which expands to:
</P><PRE
CLASS="PROGRAMLISTING"
>((fcinfo)-&gt;context != NULL &amp;&amp; IsA((fcinfo)-&gt;context, TriggerData))</PRE
><P>
    If this returns true, then it is safe to cast
    <TT
CLASS="LITERAL"
>fcinfo-&gt;context</TT
> to type <TT
CLASS="LITERAL"
>TriggerData
    *</TT
> and make use of the pointed-to
    <TT
CLASS="STRUCTNAME"
>TriggerData</TT
> structure.  The fu