Re: [BUGS] BUG #5883: Error when mixing SPI_returntuple with returning regular HeapTuple

2011-02-16 Thread Vegard Bønes
_form_tuple(funcctx->tuple_desc, ret, isnull); Datum packed_ret = HeapTupleGetDatum(heap_tuple); SRF_RETURN_NEXT(funcctx, packed_ret); } - Original Message - Fra: "Robert Haas" Til: "Vegard Bønes" Kopi: "Tom Lane" , pgsql-bugs@postgres

Re: [BUGS] BUG #5883: Error when mixing SPI_returntuple with returning regular HeapTuple

2011-02-16 Thread Robert Haas
On Tue, Feb 15, 2011 at 2:43 AM, Vegard Bønes wrote: > Ok, I tried to modify the example functions get_data_alternative_a() and > get_data_alternative_b(), so that they start with SPI_connect, and end with > SPI_finish. Also I removed SPI_connect and SPI_finish from the main function. > As I un

Re: [BUGS] BUG #5883: Error when mixing SPI_returntuple with returning regular HeapTuple

2011-02-15 Thread Vegard Bønes
t; Kopi: pgsql-bugs@postgresql.org Sendt: 14. februar 2011 17:39:07 Emne: Re: [BUGS] BUG #5883: Error when mixing SPI_returntuple with returning regular HeapTuple "" writes: > When creating a server-side C function, things go wrong when I (in the same > function) return some results vi

Re: [BUGS] BUG #5883: Error when mixing SPI_returntuple with returning regular HeapTuple

2011-02-14 Thread Tom Lane
"" writes: > When creating a server-side C function, things go wrong when I (in the same > function) return some results via SPI_returntuple, and other results by > manually creating HeapTuples. This applies even if the source for both > returns are the same data in the same table. I think the p

[BUGS] BUG #5883: Error when mixing SPI_returntuple with returning regular HeapTuple

2011-02-14 Thread
The following bug has been logged online: Bug reference: 5883 Logged by: Email address: vegard.bo...@met.no PostgreSQL version: 8.4.7 Operating system: ubuntu lucid Description:Error when mixing SPI_returntuple with returning regular HeapTuple Details: When creatin