Re: getTableName

Поиск
Список
Период
Сортировка
От Fernando Nasser
Тема Re: getTableName
Дата
Msg-id 3DFE3F68.9070406@redhat.com
обсуждение исходный текст
Ответ на getColumnLabel return value  ("Gerlits András" <gerlits@neotek.hu>)
Ответы Re: getTableName  (Dror Matalon <dror@zapatec.com>)
Список pgsql-jdbc
Dror Matalon wrote:
> On Mon, Dec 16, 2002 at 02:39:47PM -0500, Dave Cramer wrote:
>
>>Unfortunately we have no idea which table belongs with which column.
>>
>>We would need the server to return fully qualified names such as
>>table.col
>

The problem is that a table name is  not defined when joins are
involved, if there are subqueries without an alias clause, for synthetic
columns (results of expressions) etc.

BTW, the definition of getTableName() says "" is returned in these cases.
I wonder how useful would be a feature that works "some times".

The Sun JDBC book (White et al.) says "Because this feature is not widely
supported, the return value from many DBMSs will be an empty string.

I am not sure if I understand why you need this.
If you are generating this query graphically with some tool, you would know for
sure where each column come from as the user will be selecting things from
listboxes with table qualified names (or for several listboxes for a specific
table) and your tool will be adding them to the select-list in some fixed order.


--
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


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

Предыдущее
От: Dror Matalon
Дата:
Сообщение: Re: getTableName
Следующее
От: Dror Matalon
Дата:
Сообщение: Re: getTableName