Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoaiS-0008RZ-IN for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Oct 2015 17:28:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZoaiS-0004id-4J for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Oct 2015 17:28:52 +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 1Zoahp-0003J5-A5 for pgsql-bugs@postgresql.org; Tue, 20 Oct 2015 17:28:13 +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 1Zoahn-0004If-1U for pgsql-bugs@postgresql.org; Tue, 20 Oct 2015 17:28:12 +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 t9KHS3ER004300; Tue, 20 Oct 2015 13:28:03 -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: <31798.1445291860@sss.pgh.pa.us> References: <20151019130052.3019.36176@wrigleys.postgresql.org> <1021.1445268698@sss.pgh.pa.us> <56251247.2080007@2ndquadrant.com> <31798.1445291860@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 19 Oct 2015 14:57:40 -0700" Date: Tue, 20 Oct 2015 10:28:04 -0700 Message-ID: <75961.1445362084@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 I wrote: > Petr Jelinek writes: >> 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. But on second thought, that would have the json code knowing more about timestamps than timestamp_out does, which seems like pretty bad design. I'll change it as you suggest. 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