Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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,

In response to


pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group