Re: Returnd Refcurser (<unnamed portal x> not fetchable

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Christian Kindler <christian(dot)kindler(at)gmx(dot)net>
Cc: "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:31:03
Message-ID: 20070810063103.GA7903@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Aug 10, 2007 at 08:16:28AM +0200, Christian Kindler wrote:
> select * from getfoo('M');
> -- fetch all in '<unnamed portal 14>';
>
> ERROR: syntax error at or near "'<unnamed portal 14>'" at character 15

The cursor name is an identifier so use double quotes instead of
single quotes. Also, when using non-holdable cursors you'll need
to be in a transaction block.

begin;
select * from getfoo('M');
fetch all in "<unnamed portal 14>";
commit;

--
Michael Fuhr

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christian Kindler 2007-08-10 06:35:28 Re: Returnd Refcurser (<unnamed portal x> not fetchable
Previous Message Tom Lane 2007-08-10 06:26:38 Re: Returnd Refcurser (<unnamed portal x> not fetchable