944,082 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1124
  • C++ RSS
Apr 28th, 2006
0

postgres server function

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
maciek1024 is offline Offline
1 posts
since Apr 2006
Apr 28th, 2006
0

Re: postgres server function

Your best bet would probably be in the documentation for that function.

I'd have to start here.
http://www.google.com/search?q=SPI_m...PI_modifytuple
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: C++ Builder 6 - DateTimePicker
Next Thread in C++ Forum Timeline: Change text colour in console





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC