Re: Support for DatabaseMetadata: getCatalogName, getTableName, - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Support for DatabaseMetadata: getCatalogName, getTableName,
Date
Msg-id Pine.BSO.4.64.0701041609540.20842@leary2.csoft.net
Whole thread Raw
In response to Re: Support for DatabaseMetadata: getCatalogName, getTableName,  (Ken Johanson <pg-user@kensystem.com>)
Responses Re: Support for DatabaseMetadata: getCatalogName, getTableName,
List pgsql-jdbc

On Thu, 4 Jan 2007, Ken Johanson wrote:

> I guess I am not fully understanding why getTableName isn't just being
> populated with PGResultSetMetaData.getBaseTableName() in the first place; if
> so please feel welcome to hit me over the head with the cold hard truth ;-)
>

The previous discussion I cited was referring to getColumnName and how it
really should be referring to the alias of a result, not the column
itself.  That is for "SELECT a AS b FROM c AS d" should return "b" for
getColumnName(1).  If we accept that as true then it follows that
getTableName(1) should return "d", not "c".  Right now we don't have the
information to return "d" and so we must always return the empty string.
Getting the base column and table names seems more useful but does not
appear to be what the javadoc and spec imply as the behavior of the
standard API methods.

Kris Jurka


pgsql-jdbc by date:

Previous
From: Ken Johanson
Date:
Subject: Re: Support for DatabaseMetadata: getCatalogName, getTableName,
Next
From: Dave Cramer
Date:
Subject: Re: need to update TimestampUtils code