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

From Ken Johanson
Subject Re: Support for DatabaseMetadata: getCatalogName, getTableName,
Date
Msg-id 459D6CEC.9040505@kensystem.com
Whole thread Raw
In response to Re: Support for DatabaseMetadata: getCatalogName, getTableName,  (Kris Jurka <books@ejurka.com>)
Responses Re: Support for DatabaseMetadata: getCatalogName, getTableName,
List pgsql-jdbc
Kris Jurka wrote:
>
>
> On Thu, 4 Jan 2007, Ken Johanson wrote:
>
>> These will be in the java.sql.ResultSetMetaData interface's
>> implementation? Or would I need to obtain a PGResultSetMetaData (which
>> doesn't seem to extend RSMD; does a facade RSMD impl class wrap
>> PGResultSetMetaData?)?
>>
>
> ResultSet rs = Statement.executeQuery("SELECT a, b FROM tab");
> ResultSetMetaData rsmd = rs.getMetaData();
> org.postgresql.PGResultSetMetaData pgrsmd =
>     (org.postgresql.PGResultSetMetaData)rsmd;
> for (int i=1; i<=rsmd.getColumnCount(); i++) {
>     System.out.println(pgrsmd.getBaseTableName(i));
> }
>
> Kris Jurka
>
>


Kris, I'm sorry, I meant, will I be able to get the table name via
ResultSetMetaData.getTableName(int). The app I'm using internally
depends on standard interfaces at its core and unfortunately I don't
have the ability (nor desire really) to add in impl-specific code.

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 ;-)

Thank you again,
Ken



pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Serbian JDBC translation
Next
From: Kris Jurka
Date:
Subject: Re: Support for DatabaseMetadata: getCatalogName, getTableName,