Re: jsonpath Time and Timestamp Special Cases

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: jsonpath Time and Timestamp Special Cases
Дата
Msg-id 66744F7E.8080903@acm.org
обсуждение исходный текст
Ответ на Re: jsonpath Time and Timestamp Special Cases  ("David E. Wheeler" <david@justatheory.com>)
Список pgsql-hackers
On 06/20/24 10:54, David E. Wheeler wrote:
> Still not sure about `24:00:00` as a time, though. I presume the jsonpath standard disallows it.

In 9075-2 9.46 "SQL/JSON path language: syntax and semantics", the behavior
of the .time() and .time_tz() and similar item methods defers to the
behavior of SQL's CAST.

For example, .time(PS) (where PS is the optional precision spec) expects
to be applied to a character string X from the JSON source, and its
success/failure and result are the same as for CAST(X AS TIME PS).

The fact that our CAST(X AS TIME) will succeed for '24:00:00' might be
its own extension (or violation) of the spec (I haven't checked that),
but given that it does, we could debate whether it violates the jsonpath
spec for our jsonpath .time() to behave the same way.

The same argument may also apply for ±infinity.

Regards,
-Chap



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: DROP OWNED BY fails to clean out pg_init_privs grants
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Extension security improvement: Add support for extensions with an owned schema