Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue - Mailing list pgsql-jdbc

From Andreas Joseph Krogh
Subject Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
Date
Msg-id VisenaEmail.90.b09bf69bfcec8e52.17546ec4f83@tc7-visena
Whole thread Raw
In response to Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
På tirsdag 20. oktober 2020 kl. 18:46:17, skrev David G. Johnston <david.g.johnston@gmail.com>:
On Mon, Oct 19, 2020 at 11:46 PM Andreas Joseph Krogh <andreas@visena.com> wrote:
På tirsdag 20. oktober 2020 kl. 08:43:55, skrev Thangavel, Parameswaran <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
 
Attachment

pgsql-jdbc by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue
Next
From: Tom Lane
Date:
Subject: Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue