pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
why setFloat() changed to Oid.FLOAT8?
2+ messages / 2 participants
[nested] [flat]

* why setFloat() changed to Oid.FLOAT8?
@ 2006-02-03 18:56  Trevor Baker <amoebaworks@yahoo.ca>
  0 siblings, 1 reply; 2+ messages in thread

From: Trevor Baker @ 2006-02-03 18:56 UTC (permalink / raw)
  To: pgsql-jdbc

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: why setFloat() changed to Oid.FLOAT8?
@ 2006-02-03 19:18  Kris Jurka <books@ejurka.com>
  parent: Trevor Baker <amoebaworks@yahoo.ca>
  0 siblings, 0 replies; 2+ messages in thread

From: Kris Jurka @ 2006-02-03 19:18 UTC (permalink / raw)
  To: Trevor Baker <amoebaworks@yahoo.ca>; +Cc: pgsql-jdbc



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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-02-03 19:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-02-03 18:56 why setFloat() changed to Oid.FLOAT8? Trevor Baker <amoebaworks@yahoo.ca>
2006-02-03 19:18 ` Kris Jurka <books@ejurka.com>

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