Re: problem with setting boolean value on - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: problem with setting boolean value on
Date
Msg-id 20030929202434.GA14457@opencloud.com
Whole thread Raw
In response to Re: problem with setting boolean value on  ("Stuart M Easterling" <stuarte@cmu.edu>)
List pgsql-jdbc
On Mon, Sep 29, 2003 at 10:24:07AM -0400, Stuart M Easterling wrote:
>
> OK, when I set the JDBC type to BIT it works fine for a BOOLEAN field. Thanks
> for the feedback.
>
> For some reason JBoss is using the AbstractJdbc1Statement as opposed to
> AbstractJdbc3Statement, even when the latter is available. This is odd, I
> think I need to dig in the config files. (I'm using pg73jdbc3.jar, last build
> 2003-08-07.)

Looking at CVS, correct handling of Types.BOOLEAN was only committed on
2003-09-17:

 revision 1.3
 date: 2003/09/17 05:07:38;  author: barry;  state: Exp;  lines: +12 -1
 Applied patch from Kim Ho at redhat to improve boolean and bit handling
 in the jdbc driver

so Types.BOOLEAN won't work with the build you're using. This change also
introduced the override of setObject() in AbstractJdbc3Statement, which
explains why you don't see AbstractJdbc3Statement at all in your stack
trace.

There doesn't seem to be a build that includes this change on
jdbc.postgresql.org, so it looks like you need to build from CVS or keep
using Types.BIT as a workaround.

-O

pgsql-jdbc by date:

Previous
From: Barry Lind
Date:
Subject: Re: problem with setting boolean value on
Next
From: "Mushran, Vrinda"
Date:
Subject: Why are 'select1; commit' run along with 'set autocommit=on' when turning autocommit on again on a jdbc connection