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 8E4D39DCA61 for ; Wed, 21 Dec 2005 03:26:45 -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 96844-07 for ; Wed, 21 Dec 2005 03:26:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id 204D39DCA0A for ; Wed, 21 Dec 2005 03:26:42 -0400 (AST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.21]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EoyMz-0002tk-Nh; Wed, 21 Dec 2005 20:26:41 +1300 Message-ID: <43A903BE.3060405@opencloud.com> Date: Wed, 21 Dec 2005 07:26:54 +0000 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "j.random.programmer" CC: pg@fastcrypt.com, pgsql-jdbc@postgresql.org Subject: Re: Bug: Driver(8.2dev-500.jdbc3) does not handle boolean->BIT References: <20051221044129.56245.qmail@web32013.mail.mud.yahoo.com> <43A902CC.7020404@opencloud.com> <43A90349.5070906@opencloud.com> In-Reply-To: <43A90349.5070906@opencloud.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.096 required=5 tests=[AWL=0.096] X-Spam-Score: 0.096 X-Spam-Level: X-Archive-Number: 200512/103 X-Sequence-Number: 14434 Oliver Jowett wrote: > Oliver Jowett wrote: > >> or (nonstandard): >> >> INSERT INTO foo(bit_val) VALUES (?::bit(5)) > > > Actually, this doesn't appear to work. The CAST variant works fine, use > that instead. Bah, I'm really not having much luck with sending email before I've completely checked things today, sorry about all the individual corrections :/ CAST doesn't work either -- it seems there is no explicit cast from varchar to bit(n) at all. So you can either mess with input functions directly, or write a custom PGobject type, or turn on string autocasting. -O