Re: getColumnName() Problems - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: getColumnName() Problems
Date
Msg-id 1018894170.4601.64.camel@inspiron.cramers
Whole thread Raw
In response to getColumnName() Problems  (Joseph Rajkumar <rajkumar@telocity.com>)
List pgsql-jdbc
Joseph,

I had a look at the java.sql interface and there is no indication as to
how those methods should be implemented.
Currently the results you are seeing are not a bug and AFAIK the backend
does not provide us with the "real" column name.

Dave
On Thu, 2002-04-11 at 09:34, Joseph Rajkumar wrote:
> 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@telocity.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>



pgsql-jdbc by date:

Previous
From: Andy W.
Date:
Subject: Re: Inserting 'Dates' in database
Next
From: Panu Outinen
Date:
Subject: Fixes for JDBC's getColumns() in Postgresql 7.2 & CVS