pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ken Johanson <pg-user@kensystem.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Cc: Dave Cramer <pg@fastcrypt.com>
Subject: Re: Support for DatabaseMetadata: getCatalogName, getTableName,
Date: Thu, 04 Jan 2007 14:09:00 -0700
Message-ID: <459D6CEC.9040505@kensystem.com> (raw)
In-Reply-To: <Pine.BSO.4.64.0701041324480.24201@leary2.csoft.net>
References: <4594B16C.5010609@kensystem.com>
	<3936D281-E235-4FB3-889E-08981ABB0954@fastcrypt.com>
	<Pine.BSO.4.64.0701041139350.18398@leary2.csoft.net>
	<459D3487.6080202@kensystem.com>
	<Pine.BSO.4.64.0701041225110.24201@leary2.csoft.net>
	<459D3F3E.5040006@kensystem.com>
	<Pine.BSO.4.64.0701041324480.24201@leary2.csoft.net>

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





view thread (19+ messages)  latest in thread

Message-ID: <459D6CEC.9040505@kensystem.com>
Permalink:  ../459D6CEC.9040505@kensystem.com/
Also on:    postgresql.org/message-id/459D6CEC.9040505@kensystem.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pg-user@kensystem.com, books@ejurka.com, pg@fastcrypt.com
  Subject: Re: Support for DatabaseMetadata: getCatalogName, getTableName,
  In-Reply-To: <459D6CEC.9040505@kensystem.com>
  References: <4594B16C.5010609@kensystem.com> <3936D281-E235-4FB3-889E-08981ABB0954@fastcrypt.com> <Pine.BSO.4.64.0701041139350.18398@leary2.csoft.net> <459D3487.6080202@kensystem.com> <Pine.BSO.4.64.0701041225110.24201@leary2.csoft.net> <459D3F3E.5040006@kensystem.com> <Pine.BSO.4.64.0701041324480.24201@leary2.csoft.net> <459D6CEC.9040505@kensystem.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox