Hi,

I need to use function:
SPI_modifytuple
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.

Relation rel;
TriggerData *trigdata = (TriggerData *) fcinfo->context;
rel = trigdata->tg_relation;

Maybe it works fine with trigger, but I am calling myFunction from sql like:
select myFunction();

How to get Relation?
Can anybody help me?

Regards,
Maciej Banasiak