From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tim Smith <randomdev4+postgres(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: "JSON does not support infinite date values" |
Date: | 2015-02-26 16:16:31 |
Message-ID: | 54EF46DF.6050104@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 02/26/2015 11:03 AM, Tim Smith wrote:
> FYI.... although I remain a +1 on KISS and emitting "infinity", for
> those of you still yearning after a standards-based implementation,
> there is a StackOverflow post which hints at sections 3.5 and 3.7 of
> ISO8601:2004.
>
> Unfortunatley I can't find a link to an ISO8601:2004 text, so you'll
> have to make do with the SO quoted extracts instead....
> http://stackoverflow.com/questions/11408249/how-do-you-represent-forever-infinitely-in-the-future-in-iso8601
>
If you want to do that then store that in your date/timestamp data and
we'll output it. But we're not going to silently convert infinity to
anything else:
andrew=# select to_json('99999-12-31'::timestamptz);
to_json
------------------------------
"99999-12-31T00:00:00-05:00"
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Tim Smith | 2015-02-26 16:27:39 | Re: "JSON does not support infinite date values" |
Previous Message | Adrian Klaver | 2015-02-26 16:15:05 | Re: "JSON does not support infinite date values" |