Document DateStyle effect on jsonpath string()

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Document DateStyle effect on jsonpath string()
Date: 2024-07-02 16:51:19
Message-ID: 56955B33-6959-4FDA-A459-F00363ECDFEE@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hackers,

In fuzing around trying to work out what’s going on with the formatting of timestamptz values cast by the timestamp_tz() jsonpath method[1], I noticed that the formatting of the string() method applied to date and time objects was not fully tested, or how the output is determined by the DateStyle method.

The attached path aims to rectify this situation by adding tests that chain string() after the jsonpath date/time methods, both with the default testing “PostreSQL” DateStyle and “ISO”. It also mentions the impact of the DateStyle parameter in the string() documentation.

Also available to review as a pull request[2].

Best,

David

[1]: https://www.postgresql.org/message-id/7DE080CE-6D8C-4794-9BD1-7D9699172FAB%40justatheory.com
[2]: https://github.com/theory/postgres/pull/7/files

Attachment Content-Type Size
v1-0001-Document-impact-of-datestyle-on-jsonpath-string.patch application/octet-stream 6.1 KB
unknown_filename text/plain 2 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2024-07-02 16:51:45 Re: Built-in CTYPE provider
Previous Message Nathan Bossart 2024-07-02 16:27:00 Re: small pg_dump code cleanup