View Single Post

   
  #2 (permalink)  
Old 05-10-2008, 02:05 PM
Kris Jurka
 
Posts: n/a
Default Re: Correct getScale() behavior?



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


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

Reply With Quote