plperl and refcursor?

From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: plperl and refcursor?
Date: 2006-07-28 13:57:14
Message-ID: BAY20-F5A59995D6A166897F5AD4F9590@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

I had problem with cursor in plperl. Fetch returns zero rows not one, and I
don't know why.

create or replace function outside() returns void as $$
declare bbb cursor for select 12 as x;
begin
open bbb;
perform poo(bbb);
end;
$$ language plpgsql;
select outside();

create or replace function poo(refcursor) returns void as $$
my $sth = spi_exec_query("fetch all from $_[0]");
elog(NOTICE, "boooo ".$sth->{processed}); # expected one, got zero
$$ language plperlu;

Can you help me?

Thank you
Pavel Stehule

_________________________________________________________________
Najdete si svou lasku a nove pratele na Match.com. http://www.msn.cz/

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2006-07-28 14:03:31 Re: [HACKERS] pgstattuple extension for indexes
Previous Message Tom Lane 2006-07-28 13:56:28 Re: The vacuum-ignore-vacuum patch