From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Eric E <whalesuit(at)bonbon(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: return next and pl/perl |
Date: | 2005-06-11 21:23:41 |
Message-ID: | 20050611212341.GD20424@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778
Remember to vote!
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-06-11 23:59:25 | Re: memory question |
Previous Message | Ed L. | 2005-06-11 18:36:24 | Re: memory question |