Re: Understanding DateStyle guc in startup packet

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Understanding DateStyle guc in startup packet
Дата
Msg-id CADK3HHJCnx6Y7Dijmu+XkAqATmYGnGNuvLsc3i5BxsUzZjVX_Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Understanding DateStyle guc in startup packet  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Список pgsql-jdbc



On Mon, 19 May 2025 at 11:43, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:
>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.

If the JDK supports all the variants then yes we could easily accomplish this.

Dave

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