Re: creating WITH HOLD cursors using SPI - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: creating WITH HOLD cursors using SPI
Date
Msg-id 4213.24.211.165.134.1118593536.squirrel@www.dunslane.net
Whole thread Raw
In response to Re: creating WITH HOLD cursors using SPI  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: creating WITH HOLD cursors using SPI
List pgsql-hackers
Tom Lane said:
> Abhijit Menon-Sen <ams@oryx.com> writes:
>> I've been working on making it possible for PL/Perl users to fetch
>> large result sets one row at a time (the current spi_exec_query
>> interface just returns a big hash).
>
>> The idea is to have spi_query call SPI_prepare/SPI_open_cursor, and
>> have an spi_fetchrow that calls SPI_cursor_fetch.
>
> This seems awfully limiting; isn't return_next a better API?
>


plperl already does return_next for handing data back to postgres (see
recently applied patch). I don't understand how we can use it when fetching
data from postgres into plperl, which is what Abhijit is working on.

cheers

andrew




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: creating WITH HOLD cursors using SPI
Next
From: Tom Lane
Date:
Subject: Re: creating WITH HOLD cursors using SPI