Document DateStyle effect on jsonpath string()
David E. Wheeler <david@justatheory.com>
From: "David E. Wheeler" <david@justatheory.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-07-02T16:51:19Z
Lists: pgsql-hackers
Attachments
- v1-0001-Document-impact-of-datestyle-on-jsonpath-string.patch (application/octet-stream) patch v1-0001
- (unnamed) (text/plain)
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
Commits
-
Make jsonpath .string() be immutable for datetimes.
- cc4fdfa411fa 17.0 landed
- cb599b9ddfcc 18.0 landed
-
Improve documentation and testing of jsonpath string() for datetimes.
- ed055d249df5 18.0 landed