Re: Document DateStyle effect on jsonpath string()

David E. Wheeler <david@justatheory.com>

From: "David E. Wheeler" <david@justatheory.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>, Peter Eisentraut <peter@eisentraut.org>, jian he <jian.universality@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-09-11T17:06:00Z
Lists: pgsql-hackers
On Sep 11, 2024, at 12:26, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Building on that thought, maybe we could fix it as attached?
> This changes the just-committed test cases of course, and I did
> not look at whether there are documentation changes to make.

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.

David




Commits

  1. Make jsonpath .string() be immutable for datetimes.

  2. Improve documentation and testing of jsonpath string() for datetimes.