Re: jsonpath Time and Timestamp Special Cases

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: jsonpath Time and Timestamp Special Cases
Date: 2024-06-20 14:54:00
Message-ID: F1D53A87-6785-4C7E-9F59-43B9B639D636@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Apr 29, 2024, at 20:45, David E. Wheeler <david(at)justatheory(dot)com> wrote:

> I noticed that the jsonpath date/time functions (.time() and timestamp(), et al.) don’t support some valid but special-case PostgreSQL values, notably `infinity`, `-infinity`, and, for times, '24:00:00`:

Looking at ECMA-404[1], “The JSON data interchange syntax”, it says, of numbers:

> Numeric values that cannot be represented as sequences of digits (such as Infinity and NaN) are not
permitted.

So it makes sense that the JSON path standard would be the same, since such JSON explicitly cannot represent these values as numbers.

Still not sure about `24:00:00` as a time, though. I presume the jsonpath standard disallows it.

Best,

David

[1]: https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2024-06-20 15:08:43 Re: datfrozenxid > relfrozenxid w/ crash before XLOG_HEAP_INPLACE
Previous Message Noah Misch 2024-06-20 14:34:05 Re: Remove distprep