From: Kris Jurka Date: Thu, 15 Jul 2004 10:00:20 +0000 (+0000) Subject: When retrieving an array of numerics it attempted to set the scale on X-Git-Tag: REL7_4_4~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b2c575d4e73e456116419e7069d1512536a736a;p=thirdparty%2Fpostgresql.git When retrieving an array of numerics it attempted to set the scale on the retrieved data to zero, which doesn't work for non-integer values. Oliver Dauben --- diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java b/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java index d3317b680c2..77c40139199 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java @@ -153,7 +153,7 @@ public class Array implements java.sql.Array case Types.NUMERIC: retVal = new BigDecimal[ count ]; for ( ; count > 0; count-- ) - ((BigDecimal[])retVal)[i++] = AbstractJdbc2ResultSet.toBigDecimal( arrayContents[(int)index++], 0 ); + ((BigDecimal[])retVal)[i++] = AbstractJdbc2ResultSet.toBigDecimal( arrayContents[(int)index++], -1 ); break; case Types.REAL: retVal = new float[ count ];