Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YaxDO-0001LN-NU for pgsql-bugs@arkaria.postgresql.org; Thu, 26 Mar 2015 02:08:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YaxDN-0000tO-C1 for pgsql-bugs@arkaria.postgresql.org; Thu, 26 Mar 2015 02:08:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YaxDM-0000t5-4W for pgsql-bugs@postgresql.org; Thu, 26 Mar 2015 02:08:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YaxDI-0005aH-T0 for pgsql-bugs@postgresql.org; Thu, 26 Mar 2015 02:08:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t2Q27rm1018006; Wed, 25 Mar 2015 22:07:53 -0400 From: Tom Lane To: Michael Paquier cc: Andrew Gierth , Pedro Gimeno , rschaaf@commoninf.com, pgsql-bugs@postgresql.org Subject: Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version In-reply-to: References: <20150320194337.2573.72944@wrigleys.postgresql.org> <32478.1427122083@sss.pgh.pa.us> <26862.1427166720@sss.pgh.pa.us> <13096.1427204266@sss.pgh.pa.us> <55121967.90308@personal.formauri.es> <55129971.2070208@personal.formauri.es> <3736.1427294258@sss.pgh.pa.us> <5512E0AF.9050103@personal.formauri.es> <5512F2C0.9080007@personal.formauri.es> <8192.1427306273@sss.pgh.pa.us> <5512FE17.6020702@personal.formauri.es> <22366.1427313454@sss.pgh.pa.us> <87lhik4o45.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Michael Paquier message dated "Thu, 26 Mar 2015 10:27:54 +0900" Date: Wed, 25 Mar 2015 22:07:53 -0400 Message-ID: <18005.1427335673@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 Michael Paquier writes: > On Thu, Mar 26, 2015 at 9:19 AM, Andrew Gierth > wrote: > "Tom" == Tom Lane writes: >>> Tom> BTW, if memory serves we also have a pretty lazy rounding >>> Tom> implementation for the numeric datatype. I wonder if now would be >>> Tom> a good time to upgrade that to be round-to-nearest-even as well. >> A data point: there have been occasional complaints on IRC about the >> fact that numeric rounding is not round-to-even, but obviously it's >> harder to tell if anyone is relying on the current behavior. > Tom, if there is a patch showing up soon, would you integrate it? I > imagine that it would be good to have the same behavior for a maximum > of datatypes in 9.5 now that src/port/rint.c is more compliant. Yes, that's what I was thinking --- if we're changing this in 9.5 for float (on Windows and whatever other platforms use rint.c) then it would be sensible to fix numeric at the same time. I will commit a patch if it shows up, but do not have time to write one myself. 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