Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 3A2329FA304 for ; Thu, 4 Jan 2007 17:09:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 80889-08 for ; Thu, 4 Jan 2007 17:09:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from www01.kensystem.com (www01.kensystem.com [72.19.170.120]) by postgresql.org (Postfix) with ESMTP id 358149FA131 for ; Thu, 4 Jan 2007 17:09:03 -0400 (AST) Received: from 192.168.0.3 by www01.kensystem.com (SMTPD); id s20070104210900.3010; Thu, 04 Jan 2007 21:09:00 Message-ID: <459D6CEC.9040505@kensystem.com> Date: Thu, 04 Jan 2007 14:09:00 -0700 From: Ken Johanson User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Kris Jurka CC: pgsql-jdbc@postgresql.org, Dave Cramer Subject: Re: Support for DatabaseMetadata: getCatalogName, getTableName, References: <4594B16C.5010609@kensystem.com> <3936D281-E235-4FB3-889E-08981ABB0954@fastcrypt.com> <459D3487.6080202@kensystem.com> <459D3F3E.5040006@kensystem.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/26 X-Sequence-Number: 16391 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