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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: stepanperlov(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:12:48
Message-ID: 20151019151248.GC24392@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Oct 19, 2015 at 10:25:53AM -0400, David G. Johnston 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)?

Well, the output I see is:

SELECT row_to_json(t)
FROM (SELECT '-infinity'::timestamptz) t ;
row_to_json
----------------------------
{"timestamptz":"infinity"}

I assume the user expects positive infinity.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Roman grave inscription +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2015-10-19 15:22:58 Re: BUG #13687: bug in row_to_json function with '-infinity' timestamp
Previous Message rucsoftsec 2015-10-19 14:57:58 BUG #13688: lack of return value in r_mark_regions()