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

jdbc1 fix for BigDecimal scale bug

From: Craig Longman <craigl(at)begeek(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: jdbc1 fix for BigDecimal scale bug
Date: 2001-06-26 20:55:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
being one of the second-class citizens still stuck with jdbc1, i was
trying to resolve a bug with a computed NUMERIC field that suddenly
seemed to slow the query down to an absolute crawl.  eventually, i
figured out that the code was request a scale of just under 64K, which
made for a pretty big BigDecimal, as well as throwing the postmaster
process into fits.

i figured out what was going on, opted for a -1 scale to indicate no
scale should be explicitly used, handled the generated columns in
getObject() (where it was really hurting me) and prepared a patch.  then
i went to the jdbc2 directory to prepare a patch for it, only to find
that it was already fixed with almost exactly the same code.

so, i modified the jdbc1/ to use exactly the same code as
was in jdbc2/, and offer it here.

i'm also trying to figure this whole ant thing out, so i can make the
build process actually work with only jdk-1.1 installed without it
puking everywhere.  just doing an out-of-the-box build senses only
jdk-1.1 present, and builds the correct .jar file, but it still insists
on trying to build the example/, which seems to want
jdk-1.2 only stuff, as well as the whole contrib/retep/ tree.  the only
way i could figure out to do was to simply remove the files that caused
an error until it built ok.  i'll probably get this finished just in
time for me to no longer need jdk-1.1... ;-)



    Be Developer ID: 5852


pgsql-jdbc by date

Next:From: Dave CramerDate: 2001-06-26 22:13:40
Subject: RE: jdbc1 fix for BigDecimal scale bug
Previous:From: Dave HarknessDate: 2001-06-26 20:48:04
Subject: Re: High Memory Usage Patch -- Disregard my last message

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