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 18:27:00
Message-ID: Pine.BSO.4.64.0701041324480.24201@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Do, Leon (Leon) 2007-01-04 19:28:33 need to update TimestampUtils code
Previous Message Kris Jurka 2007-01-04 18:24:27 Re: Unexpected NullPointerException in "processDeadParsedQueries()"