Re: PQexecParams and CURSOR

From: "Laurent Marzullo" <laurent(dot)marzullo(at)atosorigin(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: PQexecParams and CURSOR
Date: 2005-01-18 08:17:07
Message-ID: NDEKIMJLKBNGEIOBDFOJEEGBDEAA.laurent.marzullo@atosorigin.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

ok.

Thanks all for you help.
I will take a look to 8.0

Laurent Marzullo

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Michael Fuhr
Sent: Monday, January 17, 2005 5:59 PM
To: Laurent Marzullo
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] PQexecParams and CURSOR

On Mon, Jan 17, 2005 at 04:44:50PM +0100, Laurent Marzullo wrote:
> > >
> > > // res = PQexec( conn , "FETCH 1 FROM MY_CURSOR" );
> >
> > The above should work if you uncomment it and comment out or remove
> > the other two attempts to execute FETCH.
>
> On my machine (2.6.7-gentoo-r9) and postgreSQL (postmaster --version) :
> 7.4.6
>
> the command above gave:
> FETCH failed: ERROR: no value found for parameter 1

The problem appears to be in the 7.4.6 backend. I did some tests
with 8.0.0rc5 and 7.4.6 and got the following results:

good 8.0.0rc5 backend, 8.0.0rc5 client
good 8.0.0rc5 backend, 7.4.6 client
bad 7.4.6 backend, 8.0.0rc5 client
bad 7.4.6 backend, 7.4.6 client

If I set log_error_verbosity to "verbose" then the 7.4.6 server
logs the following:

ERROR: 42704: no value found for parameter 1
LOCATION: ExecEvalParam, execQual.c:518

I think the following message to pgsql-commiters announces the fix
that was applied to the development branch, which will soon be
released as 8.0.0:

http://archives.postgresql.org/pgsql-committers/2004-08/msg00028.php

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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Martini 2005-01-18 08:27:25 Re: Statically linking against libpq
Previous Message lol 2005-01-18 08:05:39 Re: PostgreSQL 8 on windows very slow