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

From: Stefan Tzeggai <tzeggai(at)empirica-systeme(dot)de>
To: pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: Regression in 42.2.0? "The server''s DateStyle parameter was changed to ISO. The JDBC driver requires DateStyle to begin with ISO for correct operation. "
Date: 2018-01-22 15:29:56
Message-ID: 45531547-7922-ba11-2ff9-a8fdac0fc642@empirica-systeme.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 for correct 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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Gurmeen Bindra 2018-01-23 09:49:31 Postgres and Java 9
Previous Message Vladimir Sitnikov 2018-01-21 16:21:31 [pgjdbc/pgjdbc] e442db: fix: avoid connection failure when DateStyle is se...