public inbox for [email protected]  
help / color / mirror / Atom feed
From: Brett Okken <[email protected]>
To: [email protected]
Subject: [pgjdbc/pgjdbc] 41e4ca: fix binary transfer floating point overflow (#2710)
Date: Thu, 05 Jan 2023 08:01:17 -0800
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/master/[email protected]> (raw)

  Branch: refs/heads/master
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: 41e4ca6ea0f55814691b479e7c4e651475b1f77c
      https://github.com/pgjdbc/pgjdbc/commit/41e4ca6ea0f55814691b479e7c4e651475b1f77c
  Author: Brett Okken <[email protected]>
  Date:   2023-01-05 (Thu, 05 Jan 2023)

  Changed paths:
    M pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
    M pgjdbc/src/test/java/org/postgresql/test/jdbc2/ResultSetTest.java

  Log Message:
  -----------
  fix binary transfer floating point overflow (#2710)

* fix binary transfer floating point overflow

https://github.com/pgjdbc/pgjdbc/issues/2696


for float4 and float8 only use BigDecimal for values outside range of
java int.

float4 convert to double for BigDecimal calculation
this maintains the precision present in the binary value even if the
string representation strips it

* binary floating point math :(


Co-authored-by: Dave Cramer <[email protected]>







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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] 41e4ca: fix binary transfer floating point overflow (#2710)
  In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/master/[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox