From: Christian Kindler <christian.kindler@gmx.net>
To: Penchalaiah P. <penchalaiahp@infics.com>
To: pgsql-sql@postgresql.org
Subject: Re: Returnd Refcurser (<unnamed portal x> not fetchable
Date: Fri, 10 Aug 2007 08:16:28 +0200
Message-ID: <20070810061628.206070@gmx.net> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: christian.kindler@gmx.net, penchalaiahp@infics.com
Subject: Re: Returnd Refcurser (<unnamed portal x> not fetchable
In-Reply-To: <20070810061628.206070@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox