pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Pedro Gimeno <pgsql-004@personal.formauri.es>
Cc: rschaaf@commoninf.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version
Date: Wed, 25 Mar 2015 22:07:53 -0400
Message-ID: <18005.1427335673@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqQL4wsAX3E9gjQtOetgYQ8w7kWtFQQ3ctJfCc3PONjprA@mail.gmail.com>
References: <20150320194337.2573.72944@wrigleys.postgresql.org>
	<32478.1427122083@sss.pgh.pa.us>
	<CAB7nPqQjby+5wAc-gcD77HZRA44CJpbxrD9t83s8C7cT7D5o9g@mail.gmail.com>
	<CAB7nPqRHostL3woG9uV5ZJDH5NwvOcNiU91LQ13W5emL4iRcaw@mail.gmail.com>
	<26862.1427166720@sss.pgh.pa.us>
	<CAB7nPqST=EUbvsx-mapemgA0jD9e9sgVezaV-UvtkeMfXyrigw@mail.gmail.com>
	<13096.1427204266@sss.pgh.pa.us>
	<CAB7nPqSkh+Kma8+oGd5w67qZzSaVtkFo-2dgHwf5MAsr+enk4g@mail.gmail.com>
	<55121967.90308@personal.formauri.es>
	<CAB7nPqRRyhDtNMKC=vuTpO8XRwMEigyFh2VttnkC_eE7LbTAXQ@mail.gmail.com>
	<55129971.2070208@personal.formauri.es>
	<CAB7nPqQ=as+tSE6kA36RLpbueb__Zj_=L+wWonKMH5-nczj3yg@mail.gmail.com>
	<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>
	<CAB7nPqQL4wsAX3E9gjQtOetgYQ8w7kWtFQQ3ctJfCc3PONjprA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Michael Paquier <michael.paquier@gmail.com> writes:
> On Thu, Mar 26, 2015 at 9:19 AM, Andrew Gierth
> <andrew@tao11.riddles.org.uk> wrote:
> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> 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



view thread (31+ messages)  latest in thread

Message-ID: <18005.1427335673@sss.pgh.pa.us>
Permalink:  ../18005.1427335673@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18005.1427335673@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, michael.paquier@gmail.com, andrew@tao11.riddles.org.uk, pgsql-004@personal.formauri.es, rschaaf@commoninf.com
  Subject: Re: BUG #12885: The result of casting a double to an integer depends on the database version
  In-Reply-To: <18005.1427335673@sss.pgh.pa.us>
  References: <20150320194337.2573.72944@wrigleys.postgresql.org> <CAB7nPqQjby+5wAc-gcD77HZRA44CJpbxrD9t83s8C7cT7D5o9g@mail.gmail.com> <CAB7nPqRHostL3woG9uV5ZJDH5NwvOcNiU91LQ13W5emL4iRcaw@mail.gmail.com> <26862.1427166720@sss.pgh.pa.us> <CAB7nPqST=EUbvsx-mapemgA0jD9e9sgVezaV-UvtkeMfXyrigw@mail.gmail.com> <13096.1427204266@sss.pgh.pa.us> <CAB7nPqSkh+Kma8+oGd5w67qZzSaVtkFo-2dgHwf5MAsr+enk4g@mail.gmail.com> <55121967.90308@personal.formauri.es> <CAB7nPqRRyhDtNMKC=vuTpO8XRwMEigyFh2VttnkC_eE7LbTAXQ@mail.gmail.com> <55129971.2070208@personal.formauri.es> <CAB7nPqQ=as+tSE6kA36RLpbueb__Zj_=L+wWonKMH5-nczj3yg@mail.gmail.com> <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> <CAB7nPqQL4wsAX3E9gjQtOetgYQ8w7kWtFQQ3ctJfCc3PONjprA@mail.gmail.com> <18005.1427335673@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