From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Mitar <mmitar@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@postgresql.org
Subject: Re: Relaxing NaN/Infinity restriction in JSON fields
Date: Wed, 8 May 2019 09:09:37 -0400
Message-ID: <20190508130937.GA6216@alvherre.pgsql> (raw)
In-Reply-To: <CAKLmikMFGy7JJFUBY7SfZxGQwy6nWY51Dt=nD7byVavjoCT0vg@mail.gmail.com>
On 2019-May-07, Mitar wrote:
> On Mon, May 6, 2019 at 1:21 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > 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.
If you want to complain about JSON, it's IETF that you need to talk
about, not us -- we're just implementing their spec. As for storing the
numbers in a database, you can already do that, just not on the JSON
datatype.
There is a lot of talk in the json mailing list about subnormals and why
they don't want them valid in JSON because of interoperability, and that
discussion led to the wording present in RFC7159; strangely, the wording
there about Inf/NaN predates that discussion (it's already there in
RFC4627) and I couldn't find the rationale for they being disallowed.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: alvherre@2ndquadrant.com, mmitar@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: Relaxing NaN/Infinity restriction in JSON fields
In-Reply-To: <20190508130937.GA6216@alvherre.pgsql>
References: <CAKLmikMFGy7JJFUBY7SfZxGQwy6nWY51Dt=nD7byVavjoCT0vg@mail.gmail.com> <20190508130937.GA6216@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox