From: | Fernando Nasser <fnasser(at)redhat(dot)com> |
---|---|
To: | Dror Matalon <dror(at)zapatec(dot)com> |
Cc: | PostgreSQL JDBC <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: getTableName |
Date: | 2002-12-16 21:02:32 |
Message-ID: | 3DFE3F68.9070406@redhat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)redhat(dot)com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
From | Date | Subject | |
---|---|---|---|
Next Message | Dror Matalon | 2002-12-16 21:29:10 | Re: getTableName |
Previous Message | Dror Matalon | 2002-12-16 19:57:05 | Re: getTableName |