From: | "Christian Kindler" <christian(dot)kindler(at)gmx(dot)net> |
---|---|
To: | "Penchalaiah P(dot)" <penchalaiahp(at)infics(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Returnd Refcurser (<unnamed portal x> not fetchable |
Date: | 2007-08-10 06:16:28 |
Message-ID: | 20070810061628.206070@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Sorry but this didn't help ...
Can not return next ... so I changed the returns as too but same effect as the first function:
drop table foo;
create table foo(sirname text, name text);
insert into foo values ('Mueller', 'Marcus');
drop function getfoo(char(1));
create or replace function getfoo(char(1)) returns setof refcursor as
'
declare
ref refcursor;
begin
open ref for select * from foo where sirname like ''%'' || $1 || ''%'';
return next ref;
end;
'
LANGUAGE 'plpgsql' VOLATILE;
select * from getfoo('M');
-- fetch all in '<unnamed portal 14>';
ERROR: syntax error at or near "'<unnamed portal 14>'" at character 15
--
cu
Chris
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-08-10 06:26:38 | Re: Returnd Refcurser (<unnamed portal x> not fetchable |
Previous Message | Penchalaiah P. | 2007-08-10 06:05:20 | Re: Returnd Refcurser (<unnamed portal x> not fetchable |