Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Adrian Klaver
On 02/26/2015 08:27 AM, Tim Smith wrote: Seriously? Json not supporting infinity makes it useless. Ok, so it has been useless for the, I don't know, last 10 years? Just face it Andres, it should have never been coded that way in the first place. The fact that it appears that nobody in the last

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Adrian Klaver
On 02/26/2015 08:27 AM, Tim Smith wrote: Seriously? Json not supporting infinity makes it useless. Ok, so it has been useless for the, I don't know, last 10 years? Just face it Andres, it should have never been coded that way in the first place. The fact that it appears that nobody in the last

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Tim Smith
> 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: Just for the record, I never said I wanted to do it. I was saying it for the benefit of those people who replied to this thread talking

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Tim Smith
> Seriously? Json not supporting infinity makes it useless. Ok, so it has > been useless for the, I don't know, last 10 years? Just face it Andres, it should have never been coded that way in the first place. The fact that it appears that nobody in the last 10 years has used "infinity" in conjunc

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Andrew Dunstan
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 t

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Adrian Klaver
On 02/26/2015 07:54 AM, Tim Smith wrote: So +1 for removing the error and emitting "infinity" suitably quoted. Andrew, will you do that? +1 here too. Otherwise there's very little point having the "infinity" feature in Postgres if only some of the database functions actually support it withou

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Tim Smith
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 ma

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Andres Freund
On 2015-02-26 15:54:37 +, Tim Smith wrote: > Otherwise there's very little point having the "infinity" feature in > Postgres if only some of the database functions actually support it > without throwing a tantrum. Seriously? Json not supporting infinity makes it useless. Ok, so it has been use

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Andrew Dunstan
On 02/26/2015 10:38 AM, Tom Lane wrote: 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. S

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Tim Smith
> So +1 for removing the error and emitting "infinity" suitably quoted. > Andrew, will you do that? > +1 here too. Otherwise there's very little point having the "infinity" feature in Postgres if only some of the database functions actually support it without throwing a tantrum. If its a databas

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Tom Lane
Andres Freund 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

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Andres Freund
On 2015-02-26 10:16:38 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2015-02-26 11:55:20 +, 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

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Andrew Dunstan
On 02/26/2015 10:16 AM, Tom Lane wrote: Andres Freund writes: On 2015-02-26 11:55:20 +, 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

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Tom Lane
Andres Freund writes: > On 2015-02-26 11:55:20 +, 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.

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Andrew Dunstan
On 02/26/2015 07:02 AM, Andres Freund wrote: Hi, On 2015-02-26 11:55:20 +, 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, an

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Adrian Klaver
On 02/26/2015 03:55 AM, Tim Smith wrote: Hi, 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 ? Surely it should just insert the word 'infinity' into the JSON output, just like it displays in a simple SQL query

Re: [GENERAL] "JSON does not support infinite date values"

2015-02-26 Thread Andres Freund
Hi, On 2015-02-26 11:55:20 +, 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 ab14