pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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: Thu, 26 Mar 2015 02:12:16 +0000
Message-ID: <87h9t84ig5.fsf@news-spur.riddles.org.uk> (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" == Michael Paquier <michael.paquier@gmail.com> writes:

 Michael> Indeed...
 Michael> =# select column1 AS double_value, cast(column1 AS INT) AS
 Michael> int_value

The complication for numeric is that there's also the case of round(x,n)
and casting to numeric(m,n) to consider.

-- 
Andrew (irc:RhodiumToad)


-- 
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: <87h9t84ig5.fsf@news-spur.riddles.org.uk>
Permalink:  ../87h9t84ig5.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87h9t84ig5.fsf@news-spur.riddles.org.uk

 · 

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: andrew@tao11.riddles.org.uk, michael.paquier@gmail.com, tgl@sss.pgh.pa.us, 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: <87h9t84ig5.fsf@news-spur.riddles.org.uk>
  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> <87h9t84ig5.fsf@news-spur.riddles.org.uk>

* 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