Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Jdbc > Correct getScal...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 1946 of 1994
Post > Topic >>

Correct getScale() behavior?

by dombrd@[EMAIL PROTECTED] ("Dave Dombrosky") May 5, 2008 at 04:24 PM

I am currently trying to move from the 8.1 JDBC driver to the 8.2
version.  In my app, I have some code that checks the scale of a
NUMERIC, and if it is 0, then I convert the value into an Integer.
This code works fine on 8.1 and previous driver versions, but breaks
on 8.2 and 8.3.

I have looked into the driver source, and it seems like a change was
made in the 8.2+ drivers.  When getting the result of an aggregate sum
(of NUMERIC(7,2) values) in 8.1 it returns -1 as the scale, but in 8.2
it returns 0.  It looks like "-1" is meant to be taken as an undefined
value, which seems to be the correct behavior to me.

Is there a reason this was changed in the 8.2+ drivers or is this a
bug?  I just need to find out, so I know whether to get rid of my
Integer-casting code.

-Dave

-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
 




 6 Posts in Topic:
Correct getScale() behavior?
dombrd@[EMAIL PROTECTED]   2008-05-05 16:24:09 
Re: Correct getScale() behavior?
books@[EMAIL PROTECTED]   2008-05-08 02:33:24 
Re: Correct getScale() behavior?
dombrd@[EMAIL PROTECTED]   2008-05-09 12:28:12 
Re: Correct getScale() behavior?
books@[EMAIL PROTECTED]   2008-05-09 15:45:24 
Re: Correct getScale() behavior?
tgl@[EMAIL PROTECTED] (T  2008-05-09 20:09:06 
Re: Correct getScale() behavior?
tivvpgsqljdbc@[EMAIL PROT  2008-05-12 11:10:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 20 4:30:16 CDT 2008.