Re: [HACKERS] creating WITH HOLD cursors using SPI

2005-06-24 Thread Andrew Dunstan
Abhijit Menon-Sen wrote: Hi. 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 ca

Re: [HACKERS] creating WITH HOLD cursors using SPI

2005-06-14 Thread Andrew Dunstan
Abhijit Menon-Sen wrote: 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 call

Re: [HACKERS] creating WITH HOLD cursors using SPI

2005-06-13 Thread David Fetter
On Mon, Jun 13, 2005 at 07:39:40PM +0530, Abhijit Menon-Sen wrote: > At 2005-06-12 14:54:47 +0530, [EMAIL PROTECTED] wrote: > > > > The idea is to have spi_query call SPI_prepare/SPI_open_cursor, > > and have an spi_fetchrow that calls SPI_cursor_fetch. It works > > well enough, but I don't know ho

Re: [HACKERS] creating WITH HOLD cursors using SPI

2005-06-13 Thread Abhijit Menon-Sen
At 2005-06-12 14:54:47 +0530, [EMAIL PROTECTED] wrote: > > The idea is to have spi_query call SPI_prepare/SPI_open_cursor, and have > an spi_fetchrow that calls SPI_cursor_fetch. It works well enough, but I > don't know how to reproduce spi_exec_query's error handling (it runs the > SPI_execute in

Re: [HACKERS] creating WITH HOLD cursors using SPI

2005-06-12 Thread Tom Lane
"Andrew Dunstan" <[EMAIL PROTECTED]> writes: > Tom Lane said: >> 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

Re: [HACKERS] creating WITH HOLD cursors using SPI

2005-06-12 Thread Andrew Dunstan
Tom Lane said: > Abhijit Menon-Sen <[EMAIL PROTECTED]> 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

Re: [HACKERS] creating WITH HOLD cursors using SPI

2005-06-12 Thread Tom Lane
Abhijit Menon-Sen <[EMAIL PROTECTED]> 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

[HACKERS] creating WITH HOLD cursors using SPI

2005-06-12 Thread Abhijit Menon-Sen
Hi. 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. It works