The attached patch implements spi_query() and spi_fetchrow() functions

Bruce Momjian <bruce@momjian.us>

Commit: 6d92f2106fa840a497e3cdc88bb4883e9a4712e8
Author: Bruce Momjian <bruce@momjian.us>
Date: 2005-07-10T15:19:43Z
Releases: 8.1.0
The attached patch implements spi_query() and spi_fetchrow() functions
for PL/Perl, to avoid loading the entire result set into memory as the
existing spi_exec_query() function does.

Here's how one might use the new functions:

    $x = spi_query("select ...");
    while (defined ($y = spi_fetchrow($x))) {
        ...
        return_next(...);
    }

The changes do not affect the spi_exec_query() interface in any way.

Abhijit Menon-Sen

Files

PathChange+/−
src/pl/plperl/expected/plperl.out modified +17 −0
src/pl/plperl/plperl.c modified +77 −1
src/pl/plperl/spi_internal.h modified +2 −0
src/pl/plperl/SPI.xs modified +16 −0
src/pl/plperl/sql/plperl.sql modified +13 −0