X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 9F27D9DC810 for ; Mon, 19 Dec 2005 16:14:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 40366-01 for ; Mon, 19 Dec 2005 16:14:53 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web32012.mail.mud.yahoo.com (web32012.mail.mud.yahoo.com [68.142.207.109]) by postgresql.org (Postfix) with SMTP id 343189DC801 for ; Mon, 19 Dec 2005 16:14:50 -0400 (AST) Received: (qmail 84591 invoked by uid 60001); 19 Dec 2005 20:14:51 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=SZFhr8KO4gqcMCwZDXww+qnTVYsriPh2mmUlOWsyGCZ5btLaOCDKQOzIKI1KFgQe4hq5EA1usDG9MFpz27xdqkiFsCTa7jYr/gN11JmTGUIa40EhIk6tqnCjrj9iGR1HDKk4ShYKnbbo4gAxt2FsytxiKEFAPoYD/SQV84uVhRk= ; Message-ID: <20051219201451.84589.qmail@web32012.mail.mud.yahoo.com> Received: from [165.123.243.168] by web32012.mail.mud.yahoo.com via HTTP; Mon, 19 Dec 2005 12:14:51 PST Date: Mon, 19 Dec 2005 12:14:51 -0800 (PST) From: "j.random.programmer" Subject: Bug: Driver(8.2dev-500.jdbc3) does not handle boolean->BIT correctly To: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.479 required=5 tests=[DNS_FROM_RFC_ABUSE=0.479] X-Spam-Score: 0.479 X-Spam-Level: X-Archive-Number: 200512/82 X-Sequence-Number: 14413 Running against postgres 8.1 I have: create table foo (bit_val bit); If I now try to insert, via the driver's prepared statement, a value of java boolean true into the bit_val column, I get: --------------------------------- ERROR COULD NOT SAVE..... org.postgresql.util.PSQLException: ERROR: column "bit_val" is of type bit but expression is of type boolean --------------------------------- This is totally wrong if my reading of the JDBC spec is correct. Java boolean values should be converted to bitval(1), possibly as '1' and then converted back to boolean when read from the database. If I go to psql directly, the following works fine: insert into foo (bit_val) values ('1'); THAT is what the driver should to as well. This is really hokey since it's breaking my O/R mapping tool. Best regards, --j __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com