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