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: 993588918.6507.9.camel@jigra.begeek.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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/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 Content-Type Size
jdbc1-ResultSet.patch text/plain 707 bytes

Responses

Browse pgsql-jdbc by date

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