pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Petr Jelinek <petr@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Степан Перлов <stepanperlov@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13687: bug in row_to_json function with '-infinity' timestamp
Date: Mon, 19 Oct 2015 17:54:47 +0200
Message-ID: <56251247.2080007@2ndquadrant.com> (raw)
In-Reply-To: <1021.1445268698@sss.pgh.pa.us>
References: <20151019130052.3019.36176@wrigleys.postgresql.org>
	<CAKFQuwaiJs9BZ34uUahqn0Y4GR8XeWivWQ8JixN6KiU7i3dtpg@mail.gmail.com>
	<CAEtu67+ek-WYgxTvCNdgUtOmVOOpxnhhRwAGFqt_iYP32QZQ=A@mail.gmail.com>
	<1021.1445268698@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2015-10-19 17:31, Tom Lane wrote:
> =?UTF-8?B?0KHRgtC10L/QsNC9INCf0LXRgNC70L7Qsg==?= <stepanperlov@gmail.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


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



view thread (12+ messages)  latest in thread

Message-ID: <56251247.2080007@2ndquadrant.com>
Permalink:  ../56251247.2080007@2ndquadrant.com/
Also on:    postgresql.org/message-id/56251247.2080007@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: petr@2ndquadrant.com, tgl@sss.pgh.pa.us, stepanperlov@gmail.com, david.g.johnston@gmail.com
  Subject: Re: BUG #13687: bug in row_to_json function with '-infinity' timestamp
  In-Reply-To: <56251247.2080007@2ndquadrant.com>
  References: <20151019130052.3019.36176@wrigleys.postgresql.org> <CAKFQuwaiJs9BZ34uUahqn0Y4GR8XeWivWQ8JixN6KiU7i3dtpg@mail.gmail.com> <CAEtu67+ek-WYgxTvCNdgUtOmVOOpxnhhRwAGFqt_iYP32QZQ=A@mail.gmail.com> <1021.1445268698@sss.pgh.pa.us> <56251247.2080007@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox