Re: Relaxing NaN/Infinity restriction in JSON fields

2019-05-08 Thread Mitar
Hi! On Wed, May 8, 2019 at 6:09 AM Alvaro Herrera wrote: > 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. Yes, I see

Re: Relaxing NaN/Infinity restriction in JSON fields

2019-05-08 Thread Alvaro Herrera
On 2019-May-07, Mitar wrote: > On Mon, May 6, 2019 at 1:21 PM Tom Lane 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

Re: Relaxing NaN/Infinity restriction in JSON fields

2019-05-07 Thread Mitar
Hi! On Mon, May 6, 2019 at 1:21 PM Tom Lane 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 s

Re: Relaxing NaN/Infinity restriction in JSON fields

2019-05-06 Thread Tom Lane
Mitar writes: > When migrating from MongoDB to PostgreSQL one thing which just > surprised me now is that I cannot store NaN/Infinity in JSON fields. I > know that standard JSON restricts those values, but they are a very > common (and welcome) relaxation. What are prospects of this > restriction

Relaxing NaN/Infinity restriction in JSON fields

2019-05-06 Thread Mitar
Hi! When migrating from MongoDB to PostgreSQL one thing which just surprised me now is that I cannot store NaN/Infinity in JSON fields. I know that standard JSON restricts those values, but they are a very common (and welcome) relaxation. What are prospects of this restriction being lifted? It is