Re: Document DateStyle effect on jsonpath string()

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-10 20:48:27
Message-ID: 7021EAF7-80C1-4116-B7A1-F8C2E0E29730@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sep 10, 2024, at 16:10, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:

> These JSON path functions are specified by the SQL standard, so they shouldn't depend on PostgreSQL-specific settings. At least in new functionality we should avoid that, no?

Does that also apply to `datetime(template)`, where it uses the `to_timestamp()` templates? From the docs[1]:

> The datetime() and datetime(template) methods use the same parsing rules as the to_timestamp SQL function does (see Section 9.8[2]), with three exceptions. First, these methods don't allow unmatched template patterns. Second, only the following separators are allowed in the template string: minus sign, period, solidus (slash), comma, apostrophe, semicolon, colon and space. Third, separators in the template string must exactly match the input string.

Does the standard specify a formatting language?

Best,

David

[1]: https://www.postgresql.org/docs/devel/functions-json.html
[2]: https://www.postgresql.org/docs/devel/functions-formatting.html

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2024-09-10 20:50:06 Re: Document DateStyle effect on jsonpath string()
Previous Message Tom Lane 2024-09-10 20:36:00 Re: Speeding up ruleutils' name de-duplication code, redux