| 17 | PG_FUNCTION_INFO_V1(orafce_replace_null_strings); |
| 18 | |
| 19 | static void |
| 20 | trigger_sanity_check(FunctionCallInfo fcinfo, const char *fname) |
| 21 | { |
| 22 | TriggerData *trigdata = (TriggerData *) fcinfo->context; |
| 23 | |
| 24 | /* sanity checks from autoinc.c */ |
| 25 | if (!CALLED_AS_TRIGGER(fcinfo)) |
| 26 | elog(ERROR, "%s: not fired by trigger manager", fname); |
| 27 | |
| 28 | if (!TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) |
| 29 | elog(ERROR, "%s: must be fired for row", fname); |
| 30 | |
| 31 | if (!TRIGGER_FIRED_BEFORE(trigdata->tg_event)) |
| 32 | elog(ERROR, "%s: must be fired before event", fname); |
| 33 | |
| 34 | if (trigdata->tg_trigger->tgnargs > 1) |
| 35 | elog(ERROR, "%s: only one trigger parameter is allowed", fname); |
| 36 | } |
| 37 | |
| 38 | static HeapTuple |
| 39 | get_rettuple(FunctionCallInfo fcinfo) |
no outgoing calls
no test coverage detected