Re: "JSON does not support infinite date values"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Tim Smith <randomdev4+postgres(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: "JSON does not support infinite date values"
Date: 2015-02-26 15:16:38
Message-ID: 31968.1424963798@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2015-02-26 11:55:20 +0000, Tim Smith wrote:
>> As far as I'm aware, JSON has no data types as such, and so why is
>> Postgres (9.4.1) attempting to impose its own nonsense constraints ?

> "impose its own nonsense constraints" - breathe slowly in, and out, in,
> and out.

> It looks to me like ab14a73a6ca5cc4750f0e00a48bdc25a2293034a copied too
> much code from xml.c - including a comment about XSD... Andrew, was that
> intentional?

Not wanting to put words in Andrew's mouth, but I thought the point of
those changes was that timestamps emitted into JSON should be formatted
per some ISO standard or other, and said standard (almost certainly)
doesn't know what infinity is.

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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Dunstan 2015-02-26 15:25:15 Re: "JSON does not support infinite date values"
Previous Message Tom Lane 2015-02-26 15:08:05 Re: Locking question