Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 6AE93B5DC15 for ; Tue, 24 May 2011 08:47:59 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 12116-02 for ; Tue, 24 May 2011 11:47:51 +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 CF9EBB5DBBD for ; Tue, 24 May 2011 08:47:51 -0300 (ADT) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1QOq5X-0005Pg-3a for pgsql-jdbc@postgresql.org; Tue, 24 May 2011 04:47:51 -0700 Date: Tue, 24 May 2011 04:47:51 -0700 (PDT) From: aditsu To: pgsql-jdbc@postgresql.org Message-ID: <1306237671103-4421835.post@n5.nabble.com> In-Reply-To: References: <1306228847962-4421529.post@n5.nabble.com> <1306235143484-4421744.post@n5.nabble.com> 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/75 X-Sequence-Number: 21905 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.