Search Postgresql Archives

Re: "JSON does not support infinite date values"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux