pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ian deSouza <iand@metamousetrap.com>
To: pgman@candle.pha.pa.us
Subject: BIT type still not working
Date: Wed, 10 Jan 2001 19:11:20 -0600
Message-ID: <000201c07b6b$6d56dc20$65646464@ian> (raw)

Is this true. If so, is there anytime schedule for a fix?

Thanks, Ian

Dan,

I really think there is something wrong with the boolean (bit) type setting
within the PostgreSQL JDBC driver. After checking w/ news groups and
receiving one answer below, I think the only way I can accomplish what I
need to is to go to postresql itself. Do you have any ideas?

Hi Joe,

I appreciate your response. I put in a workaround if I'm dealing with
postgresql like the following:


if (value instanceof Boolean &&
getType().equals(PersistentStore.PostgreSQL))
    {
Trace.println("Setting Boolean value for "+objAttr.getName()+"="+value);
preparedStatement.setBoolean(i, ((Boolean)value).booleanValue());
    }
else
    {
preparedStatement.setObject(i, value);
    }

and saw the output:

..
SQL: insert into Car (License,Color,Logo,Sunroof) values (?,?,?,?)
Setting Boolean value for Sunroof=false
..

with exactly the same problem, so calling setBoolean didn't work either. Do
you have any suggestions on how to get in touch with the appropriate
PostgreSQL people?
Thanks, Ian

-----Original Message-----
From:	Joe Weinstein [mailto:joe@bea.com]
Sent:	Monday, January 08, 2001 5:31 PM
To:	Ian deSouza
Subject:	Re: org.postgresql.Driver Problem?



Ian deSouza wrote:

Sorry, the value was equals to true when I get zpbit_in: t is not a valid
bitstring and when value
is false I get
zpbit_in: f is not a valid bitstring .

Hi Ian.
You shouldn't use setObject() unless you are sending
the driver a Driver-understandable java.sql Object.
In this case, you should probably just use setBoolean().






view thread (5+ messages)  latest in thread

Message-ID: <000201c07b6b$6d56dc20$65646464@ian>
Permalink:  ../000201c07b6b$6d56dc20$65646464@ian/
Also on:    postgresql.org/message-id/000201c07b6b$6d56dc20$65646464@ian

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: iand@metamousetrap.com, pgman@candle.pha.pa.us
  Subject: Re: BIT type still not working
  In-Reply-To: <000201c07b6b$6d56dc20$65646464@ian>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox