Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 021D5B5D8BD for ; Tue, 24 May 2011 06:20:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 06183-05 for ; Tue, 24 May 2011 09:20:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) by mail.postgresql.org (Postfix) with ESMTP id 7A9F0B5D801 for ; Tue, 24 May 2011 06:20:48 -0300 (ADT) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1QOnnD-0002rm-VH for pgsql-jdbc@postgresql.org; Tue, 24 May 2011 02:20:47 -0700 Date: Tue, 24 May 2011 02:20:47 -0700 (PDT) From: aditsu To: pgsql-jdbc@postgresql.org Message-ID: <1306228847962-4421529.post@n5.nabble.com> In-Reply-To: References: Subject: Re: Why is bool == java.sql.Types.BIT ?? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.864 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FORGED_YAHOO_RCVD=1.63, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01, URI_HEX=1.122 X-Spam-Level: X-Archive-Number: 201105/71 X-Sequence-Number: 21901 Kris Jurka wrote: > > On Wed, 23 Nov 2005, Thomas Kellerer wrote: > >> I noticed that table columns that are defined as "bool" (Postgres >> datatype) >> are reported as java.sql.Types.BIT through DatabaseMetadata (or >> ResultSetMetaData). >> >> Is there any valid reason why they are not reported as >> java.sql.Types.BOOLEAN? >> > > Because BOOLEAN is only available to JDBC3. Our driver still supports > JDBC2 so we use BIT. BOOLEAN and BIT are the same thing as far as we can > tell. > Hi, apologies in case this gets posted twice. I know this is an old thread, but I just hit this problem now and have the same question. I'm currently using postgresql-9.0-801.jdbc4.jar and can't see any reason not to use BOOLEAN. boolean and bit are not interchangeable or even compatible (except semantically); it definitely looks like a bug to me. Adrian -- View this message in context: http://postgresql.1045698.n5.nabble.com/Why-is-bool-java-sql-Types-BIT-tp2169629p4421529.html Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.