Thread: [pgjdbc/pgjdbc] 41e4ca: fix binary transfer floating point overflow (#2710)

[pgjdbc/pgjdbc] 41e4ca: fix binary transfer floating point overflow (#2710)

From
Brett Okken
Date:
  Branch: refs/heads/master
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: 41e4ca6ea0f55814691b479e7c4e651475b1f77c
      https://github.com/pgjdbc/pgjdbc/commit/41e4ca6ea0f55814691b479e7c4e651475b1f77c
  Author: Brett Okken <brett.okken.os@gmail.com>
  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 <davecramer@gmail.com>