Skip site navigation (1) Skip section navigation (2)

Re: scale parameter to setObject method

From: Kris Jurka <books(at)ejurka(dot)com>
To: Bob Bruynooghe <rubbish(dot)bin1(at)mac(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: scale parameter to setObject method
Date: 2008-09-11 17:36:32
Message-ID: Pine.BSO.4.64.0809111334200.12192@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-jdbc

On Fri, 5 Sep 2008, Bob Bruynooghe wrote:

> I am calling the method setObject(int parameterIndex, Object x, int 
> targetSqlType) with NUMERIC as the targetSqlType and a BigDecimal value of 
> -92233720368.54775 as x. I expected the value placed in the database to have 
> no fractional part. In fact the database contains -92233720368.54775.

I'm not sure why you expect no fraction here, the numeric type does 
support fractional parts.

> I have also tried using the method setObject(int parameterIndex, Object 
> x, int targetSqlType, int scale) and setting the scale explicitly. The 
> value of scale is being ignored.

Yes, this is a bug in the driver.

Kris Jurka

In response to

Responses

pgsql-jdbc by date

Next:From: Andre BialojahnDate: 2008-09-12 15:55:22
Subject: Re: German translation fixes
Previous:From: Campbell, LanceDate: 2008-09-11 17:30:50
Subject: Re: Found a problem with 8.2-508 JDBC 4

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group