Re: Support for DatabaseMetadata: getCatalogName, getTableName,

From: Kris Jurka <books(at)ejurka(dot)com>
To: Ken Johanson <pg-user(at)kensystem(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org, Dave Cramer <pg(at)fastcrypt(dot)com>
Subject: Re: Support for DatabaseMetadata: getCatalogName, getTableName,
Date: 2007-01-04 21:15:48
Message-ID: Pine.BSO.4.64.0701041609540.20842@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2007-01-04 21:26:06 Re: need to update TimestampUtils code
Previous Message Ken Johanson 2007-01-04 21:09:00 Re: Support for DatabaseMetadata: getCatalogName, getTableName,