X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 07A7652AC9 for ; Thu, 11 Aug 2005 10:33:30 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22672-06 for ; Thu, 11 Aug 2005 13:32:58 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id C45D0529D1 for ; Thu, 11 Aug 2005 10:32:54 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1E3DB3-0002iM-6C; Fri, 12 Aug 2005 01:32:58 +1200 Message-ID: <42FB537E.4070005@opencloud.com> Date: Fri, 12 Aug 2005 01:32:46 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andres Ledesma Cc: pgsql-jdbc@postgresql.org Subject: Re: postgresql and java data types mismatch..... References: <200508111323.42615.aledes@euskalnet.net> In-Reply-To: <200508111323.42615.aledes@euskalnet.net> X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.009 tagged_above=0 required=5 tests=[AWL=0.009] X-Spam-Level: X-Archive-Number: 200508/76 X-Sequence-Number: 13645 Andres Ledesma wrote: > According to documentation, java.sql.Types.BOOLEAN is the equivalence of SQL > BOOLEAN, but a function returning a boolean, returns something matched to > Types.BIT in java. It happens in the following code. Types.BIT and Types.BOOLEAN are, as far as I can tell from the JDBC spec, intended to be interchangeable. > A CallableStatement Function was executed and the return was of type > (java.sql.Types=-7) however type=java.sql.Types=16 was registered. > > Types = -7 correspond to Types.BIT > Types = 16 correspond to Types.BOOLEAN A workaround is to just register the OUT parameter as Types.BIT, but yes, the driver shouldn't really complain in this case. You didn't say which driver version you were using.. -O