Re: BUG #13687: bug in row_to_json function with '-infinity' timestamp

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Степан Перлов <stepanperlov(at)gmail(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13687: bug in row_to_json function with '-infinity' timestamp
Date: 2015-10-19 15:54:47
Message-ID: 56251247.2080007@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2015-10-19 17:31, Tom Lane wrote:
> =?UTF-8?B?0KHRgtC10L/QsNC9INCf0LXRgNC70L7Qsg==?= <stepanperlov(at)gmail(dot)com> writes:
>> In postgresql 9.3 it returns '-infinity'.
>
> So I see. Apparently we broke something during 9.4 devel.
>

Yeah it's the commits c00c3249e and bda76c1c8. First one changed the
output to not use to_char so that we could produce correct ISO timestamp
and disallowed the infinity altogether, the second added custom handling
for infinity, but the code does not differentiate between negative and
positive infinity. I think the json code does not need to have custom
handling of infinity but could just call the EncodeSpecialTimestamp() if
it was exported from the timestamp module.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-10-19 16:44:55 pg_regprefix() doesn't handle lookahead constraints correctly
Previous Message Tom Lane 2015-10-19 15:44:17 Re: BUG #13688: lack of return value in r_mark_regions()