getColumnName() and getColumnLabel()

From: "Gautham S(dot) Rao" <gautam(dot)rao(at)tatainfotech(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Cc: <rajkumar(at)telocity(dot)com>
Subject: getColumnName() and getColumnLabel()
Date: 2002-04-13 05:54:39
Message-ID: 009a01c1e2af$b42d8200$41057aa3@tatainfotech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

Can someone provide an answer for this query.

Regards,
Gautham.

----- Original Message -----
From: "Joseph Rajkumar" <rajkumar(at)telocity(dot)com>
To: <gautam(dot)rao(at)tatainfotech(dot)com>
Sent: Saturday, April 13, 2002 12:12 AM
Subject: getColumnName() and getColumnLabel()

> Hi Gautam
> 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
>
> I tried to post to the pgsql-jdbc(at)postgresql(dot)org mailing
> list, but my posting did not get posted. Could you please
> post this request for me. Thanks
>

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruce Momjian 2002-04-13 20:18:34 Re: Problem with array ... help!
Previous Message Zoltan Fulop 2002-04-12 20:12:48 Using postgresql connection in distributed environment