Re: upgrade problem with driver postgresql-8.1-407.jdbc3.jar

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: David Gagnon <dgagnon(at)siunik(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: upgrade problem with driver postgresql-8.1-407.jdbc3.jar
Date: 2006-09-06 20:32:03
Message-ID: 44FF3043.3030901@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

David Gagnon wrote:
> Is that a bug then since this way working with the 7.4 jdbc driver ?

It's not really a bug, it's that the driver is now more picky about
where parameters may be placed in the query. You were never really meant
to put parameters just anywhere in a query, it just happened to work in
the past.

> Any idea why it stops working ?

The older driver you used did literal substitution of parameter values
into the query.

Newer drivers turn ? placeholders into $n placeholders and pass the
actual parameter values separately to the query string. So they only
allow ? placeholders where a $n placeholder is accepted by the server.

-O

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2006-09-06 21:09:32 Re: Moving to pgfoundry
Previous Message David Gagnon 2006-09-06 20:31:01 Re: upgrade problem with driver postgresql-8.1-407.jdbc3.jar