I need to use function:
HeapTuple SPI_modifytuple(Relation rel, HeapTuple row, ncols, colnum, Datum * values, const char * nulls)
How can I get object Relation?
If I insert NULL as relation function does not modify tuples.
I have found an example, when the function was called by trigger.
TriggerData *trigdata = (TriggerData *) fcinfo->context;
rel = trigdata->tg_relation;
Maybe it works fine with trigger, but I am calling myFunction from sql like:
How to get Relation?
Can anybody help me?