From: Andreas Joseph Krogh <andreas@visena.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Thangavel, Parameswaran <Parameswaran.Thangavel@rsa.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
Date: Tue, 20 Oct 2020 18:53:17 +0200 (CEST)
Message-ID: <VisenaEmail.90.b09bf69bfcec8e52.17546ec4f83@tc7-visena> (raw)
In-Reply-To: <CAKFQuwbbYTc63HeEBPXcDzPU28Do4z+y9ZEwQKVFwCnbPP1FaQ@mail.gmail.com>
References: <CH2PR19MB3798B6096BD4EA60C2068367831F0@CH2PR19MB3798.namprd19.prod.outlook.com>
<VisenaEmail.9.b226ab802321bcdc.17544a6d3e3@tc7-visena>
<CH2PR19MB3798DAEA77750DD4F4CE67A0831F0@CH2PR19MB3798.namprd19.prod.outlook.com>
<VisenaEmail.e.3213a432433c7179.17544c1d629@tc7-visena>
<CAKFQuwbbYTc63HeEBPXcDzPU28Do4z+y9ZEwQKVFwCnbPP1FaQ@mail.gmail.com>
På tirsdag 20. oktober 2020 kl. 18:46:17, skrev David G. Johnston <
david.g.johnston@gmail.com <mailto:david.g.johnston@gmail.com>>:
On Mon, Oct 19, 2020 at 11:46 PM Andreas Joseph Krogh <andreas@visena.com
<mailto:andreas@visena.com>> wrote:
På tirsdag 20. oktober 2020 kl. 08:43:55, skrev Thangavel, Parameswaran <
Parameswaran.Thangavel@rsa.com <mailto:Parameswaran.Thangavel@rsa.com>>:
When I run the select statement, I am getting different data…
I suggest you use the native "psql"-client and chech the results from that
first.
Specifically this behavior can be readily observed using the following query:
SELECT '1.234567+e06'::float4::numeric;
Wow, that really surprices me!
SELECT '1234567'::float4::numeric;
┌─────────┐
│ numeric │
├─────────┤
│ 1234570 │
└─────────┘
(1 row)
How can this be sane?
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas@visena.com <mailto:andreas@visena.com>
www.visena.com <https://www.visena.com;
<https://www.visena.com;
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-jdbc@postgresql.org
Cc: andreas@visena.com, david.g.johnston@gmail.com, Parameswaran.Thangavel@rsa.com
Subject: Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
In-Reply-To: <VisenaEmail.90.b09bf69bfcec8e52.17546ec4f83@tc7-visena>
References: <CH2PR19MB3798B6096BD4EA60C2068367831F0@CH2PR19MB3798.namprd19.prod.outlook.com> <VisenaEmail.9.b226ab802321bcdc.17544a6d3e3@tc7-visena> <CH2PR19MB3798DAEA77750DD4F4CE67A0831F0@CH2PR19MB3798.namprd19.prod.outlook.com> <VisenaEmail.e.3213a432433c7179.17544c1d629@tc7-visena> <CAKFQuwbbYTc63HeEBPXcDzPU28Do4z+y9ZEwQKVFwCnbPP1FaQ@mail.gmail.com> <VisenaEmail.90.b09bf69bfcec8e52.17546ec4f83@tc7-visena>
* 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