"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