Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id E716F632C09 for ; Sat, 1 Aug 2009 17:54:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 47681-04 for ; Sat, 1 Aug 2009 20:54:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mail.postgresql.org (Postfix) with ESMTP id 371556328E3 for ; Sat, 1 Aug 2009 17:54:18 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MXLam-00017J-FD for pgsql-jdbc@postgresql.org; Sat, 01 Aug 2009 20:54:12 +0000 Received: from ppp-93-104-28-72.dynamic.mnet-online.de ([93.104.28.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Aug 2009 20:54:12 +0000 Received: from spam_eater by ppp-93-104-28-72.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Aug 2009 20:54:12 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Datatype of domains not reported correctly. Date: Sat, 01 Aug 2009 22:53:59 +0200 Lines: 20 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ppp-93-104-28-72.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.265 tagged_above=-10 required=5 tests=AWL=-0.265 X-Spam-Level: X-Archive-Number: 200908/1 X-Sequence-Number: 19850 Hi, I noticed that the getColumns() driver dos not return the proper java.sql.Types value for columns that are defined through a domain. I was looking at the pagila sample database. The table film contains the column release_year which is defined as year. The domain year is defined as CREATE DOMAIN year AS integer CONSTRAINT year_check CHECK (((VALUE >= 1901) AND (VALUE <= 2155))); When using getColumns() the driver returns the value 2001 for DATA_TYPE (which is java.sql.Types.DISTINCT). Maybe I'm missing something, but I would have expected the driver to return the numeric value for the underlying datatype (java.sql.Types.INTEGER in this case). Or at least java.sql.Types.OTHER (the way it's done for enums) Regards Thomas