Re: Understanding DateStyle guc in startup packet

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: Dave Cramer <davecramer(at)postgres(dot)rocks>
Cc: Manav Kumar <mkumar(at)yugabyte(dot)com>, pgsql-jdbc(at)lists(dot)postgresql(dot)org, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Subject: Re: Understanding DateStyle guc in startup packet
Date: 2025-05-19 15:37:24
Message-ID: CAB=Je-EmfXoyBRm2LefkxugqNGPta7vf=Ky8ycYpkd02_-WX_w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

>Why would you want to change it?

Applications might have their own view on the way DateStyle connection
property should be set.
It could make a difference if the app uses things like select
'03-05-2025'::date.

Of course, it would be great if the app code could resist from casting text
to dates, however,
I think the driver should stand in the way there by enforcing a very
specific DateStyle value.

To me, DateStyle looks like timezone, and client_encoding which we
currently enforce, yet we could do better and skip enforcing the values.

Vladimir

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2025-05-19 17:25:54 Re: Understanding DateStyle guc in startup packet
Previous Message Dave Cramer 2025-05-19 15:12:10 Re: Understanding DateStyle guc in startup packet