getColumnName() Problems

From: Joseph Rajkumar <rajkumar(at)telocity(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: getColumnName() Problems
Date: 2002-04-11 13:34:27
Message-ID: 3CB590E3.CE0428A@telocity.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi Folks

I am using a simple select statement like:

select location_id as "Location" from resorts;

Then from the resultSetMetaData, I am trying to
use getColumnName() and getColumnLabel(), which
return the same value "Location".

How can I get the original column name ie "location_id"
without issuing another query. I thought that
getColumnLabel would return "Location" and
getColumnName would return "location_id", but in the
simple example above both functions return the same
value of "Location".

I am using PostgreSQL-7.2 jdbc driver and would
like to know if this is a bug, not implemented or is
my understanding of the two functions wrong.

Thanks
Joseph Rajkumar
--
email: rajkumar(at)telocity(dot)com

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dennis R. Gesker 2002-04-11 14:24:50 Re: taglib help
Previous Message tony 2002-04-11 06:59:35 taglib help