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

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: upgrade problem with driver postgresql-8.1-407.jdbc3.jar
Дата
Msg-id 44FF3043.3030901@opencloud.com
обсуждение исходный текст
Ответ на Re: upgrade problem with driver postgresql-8.1-407.jdbc3.jar  (David Gagnon <dgagnon@siunik.com>)
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: David Gagnon
Дата:
Сообщение: Re: upgrade problem with driver postgresql-8.1-407.jdbc3.jar
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Moving to pgfoundry