Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoCm4-0004l4-5t for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Oct 2015 15:55:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZoCm3-000673-I6 for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Oct 2015 15:54:59 +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 1ZoCm3-00066m-0X for pgsql-bugs@postgresql.org; Mon, 19 Oct 2015 15:54:59 +0000 Received: from mail-wi0-f172.google.com ([209.85.212.172]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZoClw-0006K0-B0 for pgsql-bugs@postgresql.org; Mon, 19 Oct 2015 15:54:57 +0000 Received: by wicfx6 with SMTP id fx6so12424096wic.1 for ; Mon, 19 Oct 2015 08:54:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=rvWGe1FoOO3j6irq+VM6sbvFuRdHVr4e51TGjBpicew=; b=DtcljhHvrou2e3NMw/ukBHWPixlzkUJGezGwr64RSoPULxZMNS3xP8rHtwSs3RNmg8 hYxqjtKTLZlCESXtXaNSBAZJAYeIsURgu2gufLjHQ4buW1ospY8AT0LaUq1t+wbfqCik XJtqbd6Qb4sE7Qa7gzQRTjhMhmMmiEXpTzMp/AO4+Kv9KanzTg7JjMBTmwa+D5dsohuz qKqRRIcVYbzI1l3dqTc7kpodqTkEWRT1J3NaPio3whA/7GbYgncb1yJ9eMwY0/iu5wBQ hjYPf2jaMb9Co+AyDafjIdl4Fr/ZupKQAVICIwZQe+v4MedTa70HPv/VGYXrTYNoC6Az pxtw== X-Gm-Message-State: ALoCoQlWmUNLaVHcIBbBP/rkLy50/pcfOQCskNrXd0EeRV7or8eIbp/3njDu7lqqdpfWW7VIiFwU1APiTSEG9Axu3gptK4d7woiKQZ9yuhLUFtFhmXqMeN7+u+GNoVxlvRDkxQ9so82XCFT4ZmNVe0M8pxmBYXDzLcmLO2HInqlwe94pU0zoHgdFdccdsz1PlNdofrVX+lEg X-Received: by 10.194.23.2 with SMTP id i2mr34523027wjf.106.1445270090111; Mon, 19 Oct 2015 08:54:50 -0700 (PDT) Received: from ?IPv6:2a00:1028:96c9:ee5a:b9ec:69d5:f28b:9e62? (dynamic-2a00-1028-96c9-ee5a-b9ec-69d5-f28b-9e62.ipv6.broadband.iol.cz. [2a00:1028:96c9:ee5a:b9ec:69d5:f28b:9e62]) by smtp.gmail.com with ESMTPSA id q1sm40965465wjy.31.2015.10.19.08.54.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 08:54:48 -0700 (PDT) Subject: Re: BUG #13687: bug in row_to_json function with '-infinity' timestamp To: Tom Lane , =?UTF-8?B?0KHRgtC10L/QsNC9INCf0LXRgNC70L4=?= =?UTF-8?B?0LI=?= References: <20151019130052.3019.36176@wrigleys.postgresql.org> <1021.1445268698@sss.pgh.pa.us> Cc: "David G. Johnston" , "pgsql-bugs@postgresql.org" From: Petr Jelinek Message-ID: <56251247.2080007@2ndquadrant.com> Date: Mon, 19 Oct 2015 17:54:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1021.1445268698@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 On 2015-10-19 17:31, Tom Lane wrote: > =?UTF-8?B?0KHRgtC10L/QsNC9INCf0LXRgNC70L7Qsg==?= 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