spi_query/spi_fetchrow for pl/perl - Mailing list pgsql-patches

From Abhijit Menon-Sen
Subject spi_query/spi_fetchrow for pl/perl
Date
Msg-id 20050629094731.GA21828@penne.toroid.org
Whole thread Raw
Responses Re: spi_query/spi_fetchrow for pl/perl
List pgsql-patches
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.

Comments welcome.

-- ams

Attachment

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: libpq: fix unlikely memory leak
Next
From: "Dave Page"
Date:
Subject: Re: Dbsize backend integration