From: Philip Yarra <philip@utiba.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Alex Stienstra <alex.stienstra@zonnet.nl>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: ResultSetMetaData.getTableName() == null
Date: Fri, 22 Sep 2006 15:19:59 +1000
Message-ID: <4513727F.10107@utiba.com> (raw)
In-Reply-To: <45135EE2.6020507@opencloud.com>
References: <20060921121816.9wvu8sr34w5c4848@webmail.versatel.nl>
<45133DE5.4030100@utiba.com>
<451354B5.2070701@opencloud.com>
<45135D9B.50500@utiba.com>
<45135EE2.6020507@opencloud.com>
Oliver Jowett wrote:
> We don't know whether aliases have been used or not so we can't do this.
Just had a look at the source for getTableName:
public String getTableName(int column) throws SQLException
{
return "";
}
I can cast rsmd to PGResultSetMetaData and call getBaseTableName, and it
does what I expect - in my example, gets the table name... so is there
some reason why getTableName couldn't be re-written as:
public String getTableName(int column) throws SQLException
{
return getBaseTableName(column);
}
Sorry if this is re-hashing old ground - I read the thread you mentioned
before, but that seemed to be more about getting column names where
they're aliased in the query using an AS clause. I'm assuming there's a
lot of background that led to the implementation we have currently...
any hints gratefully accepted.
Regards, Philip.
--
Philip Yarra
Senior Software Engineer, Utiba Pty Ltd
philip@utiba.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: philip@utiba.com, oliver@opencloud.com, alex.stienstra@zonnet.nl
Subject: Re: ResultSetMetaData.getTableName() == null
In-Reply-To: <4513727F.10107@utiba.com>
References: <20060921121816.9wvu8sr34w5c4848@webmail.versatel.nl> <45133DE5.4030100@utiba.com> <451354B5.2070701@opencloud.com> <45135D9B.50500@utiba.com> <45135EE2.6020507@opencloud.com> <4513727F.10107@utiba.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox