Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

spi_query/spi_fetchrow for pl/perl


  • From: Abhijit Menon-Sen <ams(at)oryx(dot)com>
  • To: pgsql-patches(at)postgresql(dot)org
  • Cc: plperlng-devel(at)pgfoundry(dot)org
  • Subject: spi_query/spi_fetchrow for pl/perl
  • Date: Wed, 29 Jun 2005 15:17:31 +0530
  • Message-id: <20050629094731.GA21828@penne.toroid.org> <text/plain>

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: spi-query.diff
Description: Text document



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group