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. " - Mailing list pgsql-jdbc

From Dave Cramer
Subject 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. "
Date
Msg-id CADK3HHJiuoQbp=fgbboVkq3PZRm6AvvEwEChT_E0k=+rxKWsFw@mail.gmail.com
Whole thread Raw
In response to 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 <tzeggai@empirica-systeme.de>)
List pgsql-jdbc
42.1.1 will address this. The release is imminent.


On 22 January 2018 at 10:29, Stefan Tzeggai <tzeggai@empirica-systeme.de> wrote:
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


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Postgres and Java 9
Next
From: Vladimir Sitnikov
Date:
Subject: [pgjdbc/pgjdbc] e53838: docs: prepare release notes for 42.2.1(#1093)