Re: Why is bool == java.sql.Types.BIT ?? - Mailing list pgsql-jdbc

From aditsu
Subject Re: Why is bool == java.sql.Types.BIT ??
Date
Msg-id 1306237671103-4421835.post@n5.nabble.com
Whole thread Raw
In response to Re: Why is bool == java.sql.Types.BIT ??  (Oliver Jowett <oliver@opencloud.com>)
List 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.

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Why is bool == java.sql.Types.BIT ??
Next
From: Kris Jurka
Date:
Subject: Re: Support for cert auth in JDBC