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 04:47:51 -0700 (PDT)
Message-ID: <1306237671103-4421835.post@n5.nabble.com> (raw)
In-Reply-To: <BANLkTimmHNbkb+LyJfGtEuhhSuO6TFH6Yg@mail.gmail.com>
References: <dm29na$nrg$1@sea.gmane.org>
	<Pine.BSO.4.61.0511231340310.14387@leary.csoft.net>
	<1306228847962-4421529.post@n5.nabble.com>
	<BANLkTikqk9uh_3gXc4D-FHuS=+-BFTsErw@mail.gmail.com>
	<1306235143484-4421744.post@n5.nabble.com>
	<BANLkTimmHNbkb+LyJfGtEuhhSuO6TFH6Yg@mail.gmail.com>


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.



view thread (12+ messages)

Message-ID: <1306237671103-4421835.post@n5.nabble.com>
Permalink:  ../1306237671103-4421835.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1306237671103-4421835.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: <1306237671103-4421835.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> <BANLkTikqk9uh_3gXc4D-FHuS=+-BFTsErw@mail.gmail.com> <1306235143484-4421744.post@n5.nabble.com> <BANLkTimmHNbkb+LyJfGtEuhhSuO6TFH6Yg@mail.gmail.com> <1306237671103-4421835.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