pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Petr Jelinek <petr@2ndquadrant.com>
Cc: Степан Перлов <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 14:57:40 -0700
Message-ID: <31798.1445291860@sss.pgh.pa.us> (raw)
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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Petr Jelinek <petr@2ndquadrant.com> writes:
> On 2015-10-19 17:31, Tom Lane wrote:
>> 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.

Meh.  We'd have to change its API too, because it is expecting to print
into a fixed buffer.  I think probably easier to just duplicate the check.

			regards, tom lane


-- 
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: <31798.1445291860@sss.pgh.pa.us>
Permalink:  ../31798.1445291860@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/31798.1445291860@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, petr@2ndquadrant.com, stepanperlov@gmail.com, david.g.johnston@gmail.com
  Subject: Re: BUG #13687: bug in row_to_json function with '-infinity' timestamp
  In-Reply-To: <31798.1445291860@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> <56251247.2080007@2ndquadrant.com> <31798.1445291860@sss.pgh.pa.us>

* 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