Re: Support for DatabaseMetadata: getCatalogName, getTableName,

From: Ken Johanson <pg-user(at)kensystem(dot)com>
To: Kris Jurka <books(at)ejurka(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:09:00
Message-ID: 459D6CEC.9040505@kensystem.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2007-01-04 21:15:48 Re: Support for DatabaseMetadata: getCatalogName, getTableName,
Previous Message Kris Jurka 2007-01-04 20:29:32 Re: Serbian JDBC translation