Re: Wrong column names in ResultSetMetaData - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Wrong column names in ResultSetMetaData
Date
Msg-id 410EDF4D.6060808@opencloud.com
Whole thread Raw
In response to Re: Wrong column names in ResultSetMetaData  (Kris Jurka <books@ejurka.com>)
Responses Re: Wrong column names in ResultSetMetaData
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Wrong column names in ResultSetMetaData
Next
From: "Mike Martin"
Date:
Subject: Re: Wrong column names in ResultSetMetaData