Received: from mail.retep.org.uk ([216.126.85.184]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0PH7uq73991 for ; Thu, 25 Jan 2001 12:07:56 -0500 (EST) (envelope-from peter@retep.org.uk) Received: (from nobody@localhost) by mail.retep.org.uk (8.11.1/8.11.1) id f0PH7rV73985; Thu, 25 Jan 2001 12:07:53 -0500 (EST) (envelope-from peter@retep.org.uk) X-Authentication-Warning: mail.retep.org.uk: nobody set sender to peter@retep.org.uk using -f To: Bruce Momjian Subject: Re: Re: [INTERFACES] BIT type still not working Message-ID: <980442473.3a705d691f08b@webmail.retep.org.uk> Date: Thu, 25 Jan 2001 12:07:53 -0500 (EST) From: Peter T Mount Cc: iand@metamousetrap.com, PostgreSQL jdbc list References: <200101241456.JAA21411@candle.pha.pa.us> In-Reply-To: <200101241456.JAA21411@candle.pha.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.3 X-Archive-Number: 200101/60 X-Sequence-Number: 65 Quoting Bruce Momjian : > > Anyone want to address this? Added to the top of the list for Saturday. After looking at it, there's a couple of bits in the code I'm a bit suspicious of (with Boolean's). Peter > > [ Charset ISO-8859-1 unsupported, converting... ] > > 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(). > > > > > > > > > > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 853-3000 > + If your life is a hard drive, | 830 Blythe Avenue > + Christ can be your backup. | Drexel Hill, Pennsylvania > 19026 > -- Peter Mount peter@retep.org.uk PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/ RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/