Обсуждение: jsonpath Time and Timestamp Special Cases

Поиск
Список
Период
Сортировка

jsonpath Time and Timestamp Special Cases

От
"David E. Wheeler"
Дата:
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