X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 841A7D1B262 for ; Mon, 2 Aug 2004 21:52:23 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 02165-02 for ; Tue, 3 Aug 2004 00:52:17 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id E05A3D1B184 for ; Mon, 2 Aug 2004 21:52:12 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1BrnNG-0001JM-00; Tue, 03 Aug 2004 12:41:50 +1200 Message-ID: <410EDF4D.6060808@opencloud.com> Date: Tue, 03 Aug 2004 12:41:49 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Jurka Cc: Mike Martin , pgsql-jdbc@postgresql.org Subject: Re: Wrong column names in ResultSetMetaData References: <41086EF8.7010101@opencloud.com> <410ED4E6.8020806@opencloud.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200408/19 X-Sequence-Number: 10741 Kris Jurka wrote: > > On Tue, 3 Aug 2004, Oliver Jowett wrote: > > >> RSMD.getColumnLabel() returns the column alias, or maybe something >>like the column's comment (can you COMMENT ON columns?) later. > > > The spec authors must have had some > existing implementation to inspire this feature. The argument that > getColumnLabel and getColumnName should do the exact same thing just seems > wrong to me. That wasn't the argument. The column name is just that a good default label if you have nothing better to hand. If Postgres had a (hypothetical) column label field associated with each column, for example, we could return that. As for existing implementations, a quick google turned this up: http://publib.boulder.ibm.com/html/as400/v4r5/ic2924/index.htm?info/db2/rbafymst69.htm which seems to indicate that DB2 has a column display label (via LABEL ON COLUMN) in addition to column name & column comment. -O