Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 89EEE9FBF27 for ; Fri, 10 Aug 2007 03:31:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 55544-01 for ; Fri, 10 Aug 2007 03:31:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id C3F4A9FB440 for ; Fri, 10 Aug 2007 03:31:15 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id l7A6V4eh081656 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 10 Aug 2007 00:31:07 -0600 (MDT) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.14.1/8.14.1) with ESMTP id l7A6V41T007958; Fri, 10 Aug 2007 00:31:04 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.14.1/8.14.1/Submit) id l7A6V3ne007957; Fri, 10 Aug 2007 00:31:03 -0600 (MDT) (envelope-from mfuhr) Date: Fri, 10 Aug 2007 00:31:03 -0600 From: Michael Fuhr To: Christian Kindler Cc: "Penchalaiah P." , pgsql-sql@postgresql.org Subject: Re: Returnd Refcurser ( not fetchable Message-ID: <20070810063103.GA7903@winnie.fuhr.org> References: <20070810061628.206070@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070810061628.206070@gmx.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/73 X-Sequence-Number: 29011 On Fri, Aug 10, 2007 at 08:16:28AM +0200, Christian Kindler wrote: > select * from getfoo('M'); > -- fetch all in ''; > > ERROR: syntax error at or near "''" 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 ""; commit; -- Michael Fuhr