Re: CURSORs and selects with parameters - Mailing list pgsql-general

From Michael Fuhr
Subject Re: CURSORs and selects with parameters
Date
Msg-id 20050215195057.GA12898@winnie.fuhr.org
Whole thread Raw
In response to CURSORs and selects with parameters  (Dan Sugalski <dan@sidhe.org>)
Responses Re: CURSORs and selects with parameters  (Dan Sugalski <dan@sidhe.org>)
List pgsql-general
On Tue, Feb 15, 2005 at 02:32:56PM -0500, Dan Sugalski wrote:
>
> I've got some code that uses PQexecParams and does the equivalent of:
>
>    DECLARE a_cursor CURSOR FOR SELECT foo, bar FROM baz WHERE field = $1
>    FETCH NEXT a_cursor
>
> but when I get to the FETCH I'm getting back the error:
>
>    ERROR:  no value found for parameter 1

What version of PostgreSQL are you using?  I think this is fixed
in 8.0.

http://archives.postgresql.org/pgsql-general/2005-01/msg00812.php

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Dan Sugalski
Date:
Subject: CURSORs and selects with parameters
Next
From: Dan Sugalski
Date:
Subject: Re: CURSORs and selects with parameters