why setFloat() changed to Oid.FLOAT8?
why setFloat() changed to Oid.FLOAT8?
От:
Trevor Baker <amoebaworks@yahoo.ca>
Дата:
Hi, I'm thinking of upgrading from 8.0 to 8.1, but I'm wondering why the change in AbstractJdbc2Statement.setFloat() (and elsewhere in the class) of floats now being Oid.FLOAT8 instead of Ois.FLOAT4? In 8.0, I have a few functions that take a REAL as input, and I use setFloat (the 4-byte float equivalent in java) to pass the values. But in 8.1, using setFloat() now looks for functions that take DOUBLE PRECISION because the change in mapping. I know I can change my functions, tables and java methods to DOUBLE PRECISION and setDouble() to use 8-byte floats to avoid this issue, but again just wondering what's up with the 4-byte float support. thanks, Trevor Baker __________________________________________________________ Find your next car at http://autos.yahoo.ca
Re: why setFloat() changed to Oid.FLOAT8?
От:
Kris Jurka <books@ejurka.com>
Дата:
On Fri, 3 Feb 2006, Trevor Baker wrote: > I'm thinking of upgrading from 8.0 to 8.1, but I'm > wondering why the change in > AbstractJdbc2Statement.setFloat() (and elsewhere in > the class) of floats now being Oid.FLOAT8 instead of > Ois.FLOAT4? This change was made to pass Sun's JDBC test suite. Their test suite requires the full precision of Float.MAX_VALUE to Float.MIN_VALUE to be support for setFloat which requires pg's double type on the server side. Kris Jurka