From: | Степан Перлов <stepanperlov(at)gmail(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | "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 14:42:44 |
Message-ID: | CAEtu67+ek-WYgxTvCNdgUtOmVOOpxnhhRwAGFqt_iYP32QZQ=A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, Oct 19, 2015 at 5:25 PM, David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> On Mon, Oct 19, 2015 at 9:00 AM, <stepanperlov(at)gmail(dot)com> wrote:
>
>> The following bug has been logged on the website:
>>
>> Bug reference: 13687
>> Logged by: Stepan
>> Email address: stepanperlov(at)gmail(dot)com
>> PostgreSQL version: 9.4.5
>> Operating system: Ubuntu 14.04.1 LTS
>> Description:
>>
>> SELECT row_to_json(t)
>> FROM (SELECT '-infinity'::timestamptz) t
>>
>
> What do you see happening and what do you think should happen (and why)?
>
> David J.
>
>
>
Sorry, forget add output:
SELECT row_to_json(t) FROM (SELECT '-infinity'::timestamptz AS time) t
OUT: '{"time":"infinity"}'
MUST: '{"time":"-infinity"}'
In postgresql 9.3 it returns '-infinity'.
Problem with cast timestamp to string in row_to_json function.
SELECT row_to_json(t2) FROM (SELECT time::text FROM (SELECT
'-infinity'::timestamptz AS time) t) t2
returns '{"time":"-infinity"}'
From | Date | Subject | |
---|---|---|---|
Next Message | rucsoftsec | 2015-10-19 14:57:58 | BUG #13688: lack of return value in r_mark_regions() |
Previous Message | David G. Johnston | 2015-10-19 14:25:53 | Re: BUG #13687: bug in row_to_json function with '-infinity' timestamp |