Re: [JDBC] Problem with boolean type

From: Kris Jurka <books(at)ejurka(dot)com>
To: Johann Robette <jrobette(at)onyme(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, 'PostGreSQL JDBC' <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: [JDBC] Problem with boolean type
Date: 2004-10-07 15:19:18
Message-ID: Pine.BSO.4.56.0410071017190.14222@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

On Thu, 7 Oct 2004, Johann Robette wrote:

> I use EJB to create a record in a table containing a Boolean field
> "answered".
> The EJB method expects a Boolean object so I pass new Boolean(false) in
> order to create it as false.
>
> But I get the following error :
> java.sql.SQLException: ERROR: column "answered" is of type boolean but
> expression is of type text

I don't see how that could be happening. The attached test works fine for
me and exercises every way I see to set a boolean. Perhaps the EJB is
internally converting this to a setString() call? Could you investigate
more into what actual driver calls are being made?

Kris Jurka

Attachment Content-Type Size
BoolTest.java text/plain 990 bytes

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steven Klassen 2004-10-07 15:24:13 Re: interfaces for python
Previous Message Tom Lane 2004-10-07 15:10:49 Re: Current wisdom wrt fsm on 8.0

Browse pgsql-jdbc by date

  From Date Subject
Next Message Scot P. Floess 2004-10-07 15:56:15 Re: where is postgis.jar ?!
Previous Message Markus Schaber 2004-10-07 14:54:08 Re: where is postgis.jar ?!