Search Postgresql Archives

Re: return next and pl/perl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 10, 2005 at 07:24:49PM -0400, Eric E wrote:
> Hi all,
> I'm working on implementing a function in PL/PERL that will ready
> many rows.  As such I'd like to use return_next to keep memory usage
> down.  When I call return next, I get the following error message:
> 
> ERROR:  error from Perl function: Can't call method "return_next" on
> unblessed reference at (eval 18) line 25.
> 
> likewise if I use spi_return_next: ERROR:  error from Perl function:
> Can't call method "spi_return_next" on unblessed reference at (eval
> 16) line 25.
> 
> After some Google and list searching, I inferred that
> spi_return_next may not be implemented?  Is this correct?  If so, is
> there a workaround?

For 8.0, not exactly, although you can batch the entire rowset into an
array ref of hash references, then return that.

In the forthcoming 8.1 (CVS TIP), there is a return_next() method.

Cheers,
D
-- 
David Fetter david@xxxxxxxxxx http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux