Antique versions of gcc complain about vars that are initialized outside
PG_TRY and then modified within it. Rather than marking the var volatile,
expend one more line of code.
{
PLpgSQL_function *func;
PLpgSQL_execstate *save_cur_estate;
- Datum retval = 0; /* make compiler happy */
+ Datum retval;
int rc;
/*
retval = PointerGetDatum(plpgsql_exec_trigger(func,
(TriggerData *) fcinfo->context));
else if (CALLED_AS_EVENT_TRIGGER(fcinfo))
+ {
plpgsql_exec_event_trigger(func,
(EventTriggerData *) fcinfo->context);
+ retval = (Datum) 0;
+ }
else
retval = plpgsql_exec_function(func, fcinfo);
}