Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 22FBF2E0046 for ; Wed, 21 Nov 2007 04:07:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 53019-03-2 for ; Wed, 21 Nov 2007 04:07:03 -0400 (AST) Received: from smtp.host.kei.pl (v681.rev.tld.pl [195.149.226.81]) by postgresql.org (Postfix) with ESMTP id D5E1D2E0039 for ; Wed, 21 Nov 2007 04:07:02 -0400 (AST) Received: (qmail 22259 invoked by uid 681007); 21 Nov 2007 08:07:00 -0000 X-clamdmail: clamdmail 0.18a Received: from linux.samar.pl (HELO ?172.16.1.38?) (marek@lewczuk.com@87.204.17.90) by smtp.host.kei.pl with ESMTPA; 21 Nov 2007 08:07:00 -0000 Message-ID: <4743E724.60608@lewczuk.com> Date: Wed, 21 Nov 2007 09:07:00 +0100 From: Marek Lewczuk User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: pgsql-jdbc , Kris Jurka Subject: ResultSetMetaData getColumnTypeName() Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/64 X-Sequence-Number: 17819 Hi, I would like to discuss an issue ResultSetMetaData.getColumnTypeName(). Within current implementation of PostgreSQL JDBC getColumnTypeName() returns only locale name of a type, even if it is a user-defined type. The JDBC docs says: "...returns type name used by the database. If the column type is a user-defined type, then a fully-qualified type name is returned." It means, that any other type that is not defined within pg_catalog should be returned with its schema name, so e.g. type my_price in schema blabla should be returned as "blabla.my_price". It's quite simple to fix it and I'm ready to do it, but before that I would like to ask about your opinion about changing this behavior. I found this problem when I needed to translate user-defined types to Java and without schema I cannot be sure, that a type is the one that I want to translate (cause there can be many types with the same local name). I would be appreciated for your comments. Ps. Kris - if we will accept, that getColumnTypeName() should return qualified name, then that will cause small changes within org.postgresql.jdbc2.TypeInfoCache class and I would like to know what about my previous changes within this class that are related to array types. Best wishes, Marek