Re: "JSON does not support infinite date values" - Mailing list pgsql-general

From Tom Lane
Subject Re: "JSON does not support infinite date values"
Date
Msg-id 32555.1424965135@sss.pgh.pa.us
Whole thread Raw
In response to Re: "JSON does not support infinite date values"  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: "JSON does not support infinite date values"  (Andrew Dunstan <andrew@dunslane.net>)
Re: "JSON does not support infinite date values"  (Tim Smith <randomdev4+postgres@gmail.com>)
List pgsql-general
Andres Freund <andres@2ndquadrant.com> writes:
> On 2015-02-26 10:16:38 -0500, Tom Lane wrote:
>> At the same time, there is definitely no such requirement in the JSON
>> spec itself, so at least the error message is quoting the wrong
>> authority.

> To me there seems to be very little point in restricing the output that
> way. Sure, it can easily be worked around by casting before the
> conversion to json, but it's still somewhat odd to put in restrictions
> that don't exist in normal json.

Yeah, I think so.  The sequence 'infinity'::timestamp to JSON to
ISO-8601-only consumer is going to fail no matter what; there is no
need for us to force a failure at the first step.  Especially when
doing so excludes other, perfectly useful use-cases.

So +1 for removing the error and emitting "infinity" suitably quoted.
Andrew, will you do that?

            regards, tom lane


pgsql-general by date:

Previous
From: Andres Freund
Date:
Subject: Re: "JSON does not support infinite date values"
Next
From: Adrian Klaver
Date:
Subject: Re: Triggers Operations