From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | "Thangavel, Parameswaran" <Parameswaran(dot)Thangavel(at)rsa(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue |
Date: | 2020-10-20 16:53:17 |
Message-ID: | VisenaEmail.90.b09bf69bfcec8e52.17546ec4f83@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
På tirsdag 20. oktober 2020 kl. 18:46:17, skrev David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com <mailto:david(dot)g(dot)johnston(at)gmail(dot)com>>:
On Mon, Oct 19, 2020 at 11:46 PM Andreas Joseph Krogh <andreas(at)visena(dot)com
<mailto:andreas(at)visena(dot)com>> wrote:
På tirsdag 20. oktober 2020 kl. 08:43:55, skrev Thangavel, Parameswaran <
Parameswaran(dot)Thangavel(at)rsa(dot)com <mailto:Parameswaran(dot)Thangavel(at)rsa(dot)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(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-10-20 17:17:54 | Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue |
Previous Message | David G. Johnston | 2020-10-20 16:46:17 | Re: PostgresSQL 10 | Driver 42.2.5 | Float Conversion Issue |