Regression in 42.2.0? "The server''s DateStyle parameter was changedto ISO. The JDBC driver requires DateStyle to begin with ISO for correctoperation. "

Поиск
Список
Период
Сортировка
От Stefan Tzeggai
Тема Regression in 42.2.0? "The server''s DateStyle parameter was changedto ISO. The JDBC driver requires DateStyle to begin with ISO for correctoperation. "
Дата
Msg-id 45531547-7922-ba11-2ff9-a8fdac0fc642@empirica-systeme.de
обсуждение исходный текст
Ответы Re: Regression in 42.2.0? "The server''s DateStyle parameter waschanged to ISO. The JDBC driver requires DateStyle to begin with ISO forcorrect operation. "  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
I upgraded the JDBC driver today from 42.1.4 to 42.2.0

and I get the following error:

"The server''s DateStyle parameter was changed to ISO. The JDBC driver
requires DateStyle to begin with ISO for correct operation. "

It connects to a pgbouncer that has been running with JDBC 42.1.4
without problems.

I debugged into QueryExecutorImpl

>     if (name.equals("DateStyle") && !value.startsWith("ISO,")) {
>       close(); // we're screwed now; we can't trust any subsequent date.
>       throw new PSQLException(GT.tr(
>           "The server''s DateStyle parameter was changed to {0}. The JDBC driver requires DateStyle to begin with ISO
forcorrect operation.",
 
>           value), PSQLState.CONNECTION_FAILURE);
>     }

When it throws the exception value is "ISO" but it is checked for
startsWith("ISO,")

Might that be a bug? Maybe you want a regex here to check for a
word-break instead of a comma?!

Steve


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

Предыдущее
От: Vladimir Sitnikov
Дата:
Сообщение: [pgjdbc/pgjdbc] e442db: fix: avoid connection failure when DateStyleis se...
Следующее
От: Gurmeen Bindra
Дата:
Сообщение: Postgres and Java 9