Kris Jurka:
> I believe we agree that for consistency's sake we should return the table
> alias (if any) in getTableName. How could we do that, and what would the
> purpose be?
CREATE TABLE person (
id int4 primary key,
parent_id int4 references person (id),
name varchar(50)
)
SELECT * FROM person inner join person parent on person.parent_id =
parent.id
rs.getTableName() distinguishes person.name from parent.name.
In my experience, drivers correctly implement getTableName()
*far* less frequently. I've never been able to rely on it.
Of the drivers I have handy, only DB2J and MySQL get it right.
Cloudscape, Firebird, hsqldb, mssqlserver, and pg75 all return
the underlying base table name. JTDS, Oracle, and pg74 all
return empty strings!
Mike