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
Showing
- src/pl/plperl/SPI.xs 16 additions, 0 deletionssrc/pl/plperl/SPI.xs
- src/pl/plperl/expected/plperl.out 17 additions, 0 deletionssrc/pl/plperl/expected/plperl.out
- src/pl/plperl/plperl.c 77 additions, 1 deletionsrc/pl/plperl/plperl.c
- src/pl/plperl/spi_internal.h 2 additions, 0 deletionssrc/pl/plperl/spi_internal.h
- src/pl/plperl/sql/plperl.sql 13 additions, 0 deletionssrc/pl/plperl/sql/plperl.sql
Loading
Please register or sign in to comment