Re: Document DateStyle effect on jsonpath string()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Document DateStyle effect on jsonpath string()
Дата
Msg-id 3832087.1726070787@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Document DateStyle effect on jsonpath string()  ("David E. Wheeler" <david@justatheory.com>)
Ответы Re: Document DateStyle effect on jsonpath string()
Список pgsql-hackers
"David E. Wheeler" <david@justatheory.com> writes:
> On Sep 11, 2024, at 11:11, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> What "let result be stringified" behavior are you thinking of,
>> exactly?  AFAICS there's not sensitivity to timezone unless you
>> use the _tz variant, otherwise it just regurgitates the input.

> There is stringification of a time, date, or timestamp value, which
> has no TZ, but is still affected by DateStyle.

What I understood you to be referencing is what happens without
string(), which AFAICS does not result in any timezone rotation:

regression=# set timezone = 'America/New_York';
SET
regression=# select jsonb_path_query('"2023-08-15 12:34:56-09"', '$.timestamp_tz()');
      jsonb_path_query
-----------------------------
 "2023-08-15T12:34:56-09:00"
(1 row)

I think I'd be content to have string() duplicate that behavior
--- in fact, it seems like it'd be odd if it doesn't match.

            regards, tom lane



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