jdbc1 fix for BigDecimal scale bug - Mailing list pgsql-jdbc

From Craig Longman
Subject jdbc1 fix for BigDecimal scale bug
Date
Msg-id 993588918.6507.9.camel@jigra.begeek.com
Whole thread Raw
Responses RE: jdbc1 fix for BigDecimal scale bug
List 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/ResultSet.java to use exactly the same code as
was in jdbc2/ResultSet.java, 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/blobtest.java, 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... ;-)

cheers,

--

    CraigL->Thx();
    Be Developer ID: 5852


Attachment

pgsql-jdbc by date:

Previous
From: Dave Harkness
Date:
Subject: Re: High Memory Usage Patch -- Disregard my last message
Next
From: "Dave Cramer"
Date:
Subject: RE: jdbc1 fix for BigDecimal scale bug