Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoIRr-00035D-W5 for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Oct 2015 21:58:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZoIRq-0005Ck-Dh for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Oct 2015 21:58:30 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZoIRE-0004Tj-Jq for pgsql-bugs@postgresql.org; Mon, 19 Oct 2015 21:57:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZoIRC-0005Em-Bz for pgsql-bugs@postgresql.org; Mon, 19 Oct 2015 21:57:51 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t9JLvfXv012152; Mon, 19 Oct 2015 17:57:41 -0400 From: Tom Lane To: Petr Jelinek cc: =?UTF-8?B?0KHRgtC10L/QsNC9INCf0LXRgNC70L4=?= =?UTF-8?B?0LI=?= , "David G. Johnston" , "pgsql-bugs@postgresql.org" 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> <1021.1445268698@sss.pgh.pa.us> <56251247.2080007@2ndquadrant.com> Comments: In-reply-to Petr Jelinek message dated "Mon, 19 Oct 2015 17:54:47 +0200" Date: Mon, 19 Oct 2015 14:57:40 -0700 Message-ID: <31798.1445291860@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Petr Jelinek 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