From: Andreas Joseph Krogh <andreas@visena.com>
To: Thangavel, Parameswaran <Parameswaran.Thangavel@rsa.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Sv: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
Date: Tue, 20 Oct 2020 08:18:56 +0200 (CEST)
Message-ID: <VisenaEmail.9.b226ab802321bcdc.17544a6d3e3@tc7-visena> (raw)
In-Reply-To: <CH2PR19MB3798B6096BD4EA60C2068367831F0@CH2PR19MB3798.namprd19.prod.outlook.com>
References: <CH2PR19MB3798B6096BD4EA60C2068367831F0@CH2PR19MB3798.namprd19.prod.outlook.com>
På tirsdag 20. oktober 2020 kl. 05:21:51, skrev Thangavel, Parameswaran <
Parameswaran.Thangavel@rsa.com <mailto:Parameswaran.Thangavel@rsa.com>>:
Hi Team,
I am using postgresql version 9.4.1. We are in the process of upgrading to
PostgreSQL 10.
While doing so, we have upgraded the JDBC postgres driver from 9.1-901.jdbc4
to 42.2.5 Post the upgrade we are facing the issue with data integrity where
the numeric value is getting rounded off.
Scenario:
I am trying to insert a value (float datatype in Java) and in DB it is
represented as Numeric.
When I try to store, "1234567" the value is stored as "1234570".
No, it is stored as $4 = '1.234567e+06'
Which is correct as it is a 7-digit figure 1.234567 * 10^6.
--
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, Parameswaran.Thangavel@rsa.com
Subject: Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
In-Reply-To: <VisenaEmail.9.b226ab802321bcdc.17544a6d3e3@tc7-visena>
References: <CH2PR19MB3798B6096BD4EA60C2068367831F0@CH2PR19MB3798.namprd19.prod.outlook.com> <VisenaEmail.9.b226ab802321bcdc.17544a6d3e3@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