((fcinfo)->context != NULL && IsA((fcinfo)->context, TriggerData))
struct TriggerData is defined in src/include/commands/trigger.h:
typedef struct TriggerData { NodeTag type; TriggerEvent tg_event; Relation tg_relation; HeapTuple tg_trigtuple; HeapTuple tg_newtuple; Trigger *tg_trigger; } TriggerData;
where the members are defined as follows:
is pointer to structure Trigger defined in src/include/utils/rel.h:
typedef struct Trigger { Oid tgoid; char *tgname; Oid tgfoid; int16 tgtype; bool tgenabled; bool tgisconstraint; bool tgdeferrable; bool tginitdeferred; int16 tgnargs; int16 tgattr[FUNC_MAX_ARGS]; char **tgargs; } Trigger;