Re: ResultSetMetaData.getTableName() == null

Поиск
Список
Период
Сортировка
От Philip Yarra
Тема Re: ResultSetMetaData.getTableName() == null
Дата
Msg-id 4513727F.10107@utiba.com
обсуждение исходный текст
Ответ на Re: ResultSetMetaData.getTableName() == null  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: ResultSetMetaData.getTableName() == null
Список pgsql-jdbc
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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: ResultSetMetaData.getTableName() == null
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: ResultSetMetaData.getTableName() == null