pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: aditsu <aditsu@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Why is bool == java.sql.Types.BIT ??
Date: Tue, 24 May 2011 02:20:47 -0700 (PDT)
Message-ID: <1306228847962-4421529.post@n5.nabble.com> (raw)
In-Reply-To: <Pine.BSO.4.61.0511231340310.14387@leary.csoft.net>
References: <dm29na$nrg$1@sea.gmane.org>
	<Pine.BSO.4.61.0511231340310.14387@leary.csoft.net>


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.



view thread (12+ messages)  latest in thread

Message-ID: <1306228847962-4421529.post@n5.nabble.com>
Permalink:  ../1306228847962-4421529.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1306228847962-4421529.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: aditsu@yahoo.com
  Subject: Re: Why is bool == java.sql.Types.BIT ??
  In-Reply-To: <1306228847962-4421529.post@n5.nabble.com>
  References: <dm29na$nrg$1@sea.gmane.org> <Pine.BSO.4.61.0511231340310.14387@leary.csoft.net> <1306228847962-4421529.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox