Re: Document DateStyle effect on jsonpath string()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Eisentraut <peter(at)eisentraut(dot)org>, jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Document DateStyle effect on jsonpath string()
Date: 2024-09-11 19:08:35
Message-ID: 3892235.1726081715@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"David E. Wheeler" <david(at)justatheory(dot)com> writes:
> On Sep 11, 2024, at 12:26, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Building on that thought, maybe we could fix it as attached?

> It looks like that’s what datum_to_json_internal() in json.c does, which IIUC is the default stringification for date and time values.

Right. I actually lifted the code from convertJsonbScalar in
jsonb_util.c.

Here's a more fleshed-out patch with docs and regression test
fixes. I figured we could shorten the tests a bit now that
the point is just to verify that datestyle *doesn't* affect it.

regards, tom lane

Attachment Content-Type Size
v1-fix-jsonpath-string-method-for-timestamps.patch text/x-diff 7.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lars Kanis 2024-09-11 19:08:45 Re: libpq: Process buffered SSL read bytes to support records >8kB on async API
Previous Message Alvaro Herrera 2024-09-11 17:50:40 Re: First draft of PG 17 release notes