I checked the documentation, and still do not get it. I can use SPI_copytuple to return a modified version of a tuple, but how do I modify a structure of type HeapTuple. In my case, I just want to modify a INT32 column for sorting. Any ideas? Regards, Mario Weilguni ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq