Re: Relaxing NaN/Infinity restriction in JSON fields

Поиск
Список
Период
Сортировка
От Mitar
Тема Re: Relaxing NaN/Infinity restriction in JSON fields
Дата
Msg-id CAKLmikMFGy7JJFUBY7SfZxGQwy6nWY51Dt=nD7byVavjoCT0vg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Relaxing NaN/Infinity restriction in JSON fields  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Relaxing NaN/Infinity restriction in JSON fields  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-general
Hi!

On Mon, May 6, 2019 at 1:21 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Getting us to deviate from the RFC so blatantly would be a very hard sell.
> A large part of the point of the JSON datatype is to be interoperable;
> once you give that up you may as well use some not-standard-at-all
> representation.

Python supports that, enabled by default:

https://docs.python.org/3/library/json.html#infinite-and-nan-number-values

> There is not, and never has been, any claim that JSON numbers correspond
> to the IEEE spec.

There is note [1], but yes, it does not claim that nor I claimed that.
I am just saying that the reality is that most people these days use
IEEE spec floating numbers so it is sad that those cannot be easily
stored in JSON, or a database.


Mitar

[1] https://tools.ietf.org/html/rfc7159#page-7

-- 
http://mitar.tnode.com/
https://twitter.com/mitar_m



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

Предыдущее
От: Jeremy Schneider
Дата:
Сообщение: Re: Amazon Linux Support?
Следующее
От: Prashant Hunnure
Дата:
Сообщение: Postgres Database Hacked