| 36 | } |
| 37 | |
| 38 | static HeapTuple |
| 39 | get_rettuple(FunctionCallInfo fcinfo) |
| 40 | { |
| 41 | TriggerData *trigdata = (TriggerData *) fcinfo->context; |
| 42 | HeapTuple rettuple = NULL; |
| 43 | |
| 44 | if (TRIGGER_FIRED_BY_INSERT(trigdata->tg_event)) |
| 45 | rettuple = trigdata->tg_trigtuple; |
| 46 | else if (TRIGGER_FIRED_BY_UPDATE(trigdata->tg_event)) |
| 47 | rettuple = trigdata->tg_newtuple; |
| 48 | else |
| 49 | /* internal error */ |
| 50 | elog(ERROR, "remove_empty_string: cannot process DELETE events"); |
| 51 | |
| 52 | return rettuple; |
| 53 | } |
| 54 | |
| 55 | /* |
| 56 | * Trigger argument is used as parameter that can enforce warning about modified |
no outgoing calls
no test coverage detected