Re: Why is bool == java.sql.Types.BIT ??

From: aditsu <aditsu(at)yahoo(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Why is bool == java.sql.Types.BIT ??
Date: 2011-05-24 11:47:51
Message-ID: 1306237671103-4421835.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Oliver Jowett wrote:
>
> Don't you have a general problem here that the JDBC metadata cannot
> fully represent many database-specific types?
> (For example, how would you distinguish BIT from BIT(n) from BIT
> VARYING(n)?)
>

Good question, and it can indeed be an issue, although I hardly use any
database-specific type (varchar with no length is the only one I can think
of right now). However, it is a different issue - we are talking about a
type that can be represented correctly by JDBC metadata, and I am arguing
that it should be doing exactly that.
While I was considering boolean to be a fundamental, standard, basic, core
data type, it turns out it's not exactly so in the sql world. Apparently pg
is one of very few DBMSes that follows the standard. Nevertheless, since
JDBC (at least in recent versions) distinguishes between BIT and BOOLEAN, I
think it's wrong not to do that when the database has a boolean type.

Adrian

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Why-is-bool-java-sql-Types-BIT-tp2169629p4421835.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2011-05-24 16:27:47 Re: Support for cert auth in JDBC
Previous Message Oliver Jowett 2011-05-24 11:21:18 Re: Why is bool == java.sql.Types.BIT ??