Re: Correct getScale() behavior? - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Correct getScale() behavior?
Date
Msg-id Pine.BSO.4.64.0805080230540.16724@leary.csoft.net
Whole thread Raw
In response to Correct getScale() behavior?  ("Dave Dombrosky" <dombrd@gmail.com>)
List pgsql-jdbc

On Mon, 5 May 2008, Dave Dombrosky wrote:

> 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.

This change was made because some ORM tools (some of the rowset stuff I
think) pulled the scale and stored it off regardless of whether it was
used or not.  The storing code did "validation" that required it be >= 0.
So everyone using these frameworks was screwed whether they needed the
scale or not.  So we changed it to keep them happy at the expense of
people like used based on a size of the camps measurement alone.

Kris Jurka


pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: JDBC and GSSAPI/Krb5 with uDig
Next
From: "Roy Smith"
Date:
Subject: Couple of preparedstatement bug suspects