Skip site navigation (1) Skip section navigation (2)

PQexecParams not seeing params

From: Paul Forgey <paulf(at)aphrodite(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: PQexecParams not seeing params
Date: 2006-06-28 00:29:46
Message-ID: (view raw or whole thread)
Lists: pgsql-interfaces
I am using the libpq client library from 8.1.4 in an application that  
is intended to be compatible with databases hosted on both 7.4 and  
8.1.  At least when talking to a 7.4 server, the following statement:

res = PQexecParams (pgc, "FETCH 100 $1", 1, NULL, paramValues, NULL,  
NULL, 1)

results in "syntax error at or near $1 at character 11".

The documentation says the parameters are referred to in the command  
string as $n.  Is this not always the case?  What am I missing?

since PQexecParams was present in 7.4 I am assuming the server has  
the sufficient protocol level to support it.


pgsql-interfaces by date

Next:From: Tom LaneDate: 2006-06-28 03:21:10
Subject: Re: PQexecParams not seeing params
Previous:From: Matteo TrainaDate: 2006-06-27 11:47:14
Subject: jdbc windows

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group