pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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



view thread (6+ messages)  latest in thread

Message-ID: <20070810061628.206070@gmx.net>
Permalink:  ../20070810061628.206070@gmx.net/
Also on:    postgresql.org/message-id/20070810061628.206070@gmx.net

 · 

reply

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