jsonpath Time and Timestamp Special Cases - Mailing list pgsql-hackers

From David E. Wheeler
Subject jsonpath Time and Timestamp Special Cases
Date
Msg-id 8AB7857D-BD57-472E-94F5-1964A5B15971@justatheory.com
Whole thread Raw
Responses Re: jsonpath Time and Timestamp Special Cases
List pgsql-hackers
Hello hackers,

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

❯ psql
psql (17devel)
Type "help" for help.

david=# select jsonb_path_query(to_jsonb('24:00:00'::time), '$.time()');
ERROR:  time format is not recognized: "24:00:00"

david=# select jsonb_path_query(to_jsonb('infinity'::timestamptz), '$.timestamp_tz()');
ERROR:  timestamp_tz format is not recognized: "infinity"

I assume this is because the standard doesn’t support these, or references JavaScript-only values or some such. Is that
right?

Best,

David




pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: A failure in prepared_xacts test
Next
From: Richard Guo
Date:
Subject: Re: A failure in prepared_xacts test