Re: getColumnName() Problems

From: Dave Cramer <dave(at)fastcrypt(dot)com>
To: Joseph Rajkumar <rajkumar(at)telocity(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: getColumnName() Problems
Date: 2002-04-15 18:09:30
Message-ID: 1018894170.4601.64.camel@inspiron.cramers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)telocity(dot)com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message AgentM 2002-04-16 05:35:27 PreparedStatement addBatch()?
Previous Message Kovács Péter 2002-04-15 15:57:41 Re: Using postgresql connection in distributed environment