public inbox for [email protected]  
help / color / mirror / Atom feed
From: Laurenz Albe <[email protected]>
To: Manav Kumar <[email protected]>
To: Vladimir Sitnikov <[email protected]>
Cc: [email protected]
Subject: Re: Understanding DateStyle guc in startup packet
Date: Fri, 23 May 2025 11:58:51 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAPhCW+8+8iQd5TLSTkyXN5OR-KoC2JfyO2kn89jPwSDF0HJdtg@mail.gmail.com>
References: <CAPhCW+-oyivUiBiP5nOMQNxQzXLnT62SvCZ1oq7rqZkHq34KGA@mail.gmail.com>
	<CAB=Je-Gznb3j_M--EAn9zW0cHLzgMg_YyWxWGM==g_kRfxEzrA@mail.gmail.com>
	<CADK3HHKC-1iTEZNT4fvjS-mBkLYVmKQVG3Kvq9_KHXnctACUjA@mail.gmail.com>
	<CAB=Je-EmfXoyBRm2LefkxugqNGPta7vf=Ky8ycYpkd02_-WX_w@mail.gmail.com>
	<CAPhCW+8m6g4dpMjwR1KtGYaC_su_qBc5jH-T4vnH2SaZVJp9kw@mail.gmail.com>
	<CAPhCW+_geB205gMyqCC-9V1oLsZDNXJYHzC6J8qo1EAM5ohihg@mail.gmail.com>
	<CAPhCW+8+8iQd5TLSTkyXN5OR-KoC2JfyO2kn89jPwSDF0HJdtg@mail.gmail.com>

On Fri, 2025-05-23 at 14:08 +0530, Manav Kumar wrote:
> Can you also share how does DRIVER comes to know the value been set for
> DateStyle is other than "ISO". and throw an error:
>  The server's DateStyle parameter was changed to Postgres, DMY. The JDBC driver requires DateStyle to begin with ISO for correct operation. 
> 
> I thought it used to read the PARAMETER STATUS packet that it receives
> from the server. But I tried changing it connection pooler i doens't
> see the same error. Can you point me to code where this assert check
> is present.  

See the method
org.postgresql.core.v3.QueryExecutorImpl.receiveParameterStatus()
https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecut...

See the PostgreSQL documentation for context:
https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-ASYNC

  ParameterStatus messages will be generated whenever the active value
  changes for any of the parameters the backend believes the frontend
  should know about. Most commonly this occurs in response to a SET SQL
  command executed by the frontend, and this case is effectively
  synchronous — but it is also possible for parameter status changes
  to occur because the administrator changed a configuration file and
  then sent the SIGHUP signal to the server. Also, if a SET command is
  rolled back, an appropriate ParameterStatus message will be generated
  to report the current effective value.

Yours,
Laurenz Albe






view thread (7+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Understanding DateStyle guc in startup packet
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox