Re: ResultSetMetaData.getTableName() == null

Поиск
Список
Период
Сортировка
Искать
От
Philip Yarra
Тема
Re: ResultSetMetaData.getTableName() == null
Дата
Msg-id
4513727F.10107@utiba.com
Ответ на
Список
Дерево обсуждения
Re: ResultSetMetaData.getTableName() == null Alex Stienstra <alex.stienstra@zonnet.nl>
Re: ResultSetMetaData.getTableName() == null Markus Schaber <schabi@logix-tt.com>
Re: ResultSetMetaData.getTableName() == null "Alex Stienstra" <Alex.Stienstra@zonnet.nl>
Re: ResultSetMetaData.getTableName() == null Markus Schaber <schabi@logix-tt.com>
Re: ResultSetMetaData.getTableName() == null Dave Cramer <pg@fastcrypt.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
В списке pgsql-jdbc по дате отправления
От: Oliver Jowett
Дата:
От: Oliver Jowett
Дата:
FAQ