X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 150FB3A4EB8 for ; Sun, 23 Jan 2005 20:10:51 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30477-08 for ; Sun, 23 Jan 2005 20:10:39 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id AAD8F3A4E70 for ; Sun, 23 Jan 2005 20:10:40 +0000 (GMT) Received: (qmail 7748 invoked from network); 23 Jan 2005 20:10:03 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 23 Jan 2005 20:10:03 -0000 Message-ID: <41F404BA.2020801@fastcrypt.com> Date: Sun, 23 Jan 2005 15:10:34 -0500 From: Dave Cramer Reply-To: pg@fastcrypt.com Organization: Postgres International User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: leo Cc: pgsql-jdbc@postgresql.org Subject: Re: PGResultSetMetaData References: <01c701c50182$47c05350$7500000a@KALIO> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.03 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/220 X-Sequence-Number: 12100 Leo, Here is the documentation of the interface /** * Returns the underlying table name of query result, or "" * if it is unable to be determined. * * @since 8.0 */ public String getBaseTableName(int column) throws SQLException; /** * Returns the underlying table name of query result, or "" * if it is unable to be determined. * * @since 8.0 */ public String getBaseSchemaName(int column) throws SQLException; So I'm guessing your query makes it difficult to find the table names and the schema names. What is your query? Dave leo wrote: >Chris Smith: > > >> ResultSet rs = stmt.executeQuery(...); >> ResultSetMetaData rmd = rs.getMetaData(); >> >> String table = rmd.getTableName(1); >> String schema = rmd.getSchemaName(1); >> >> >Does this really work? > >Using Postgres 8 i am getting empty strings from both methods. > > >---------------------------(end of broadcast)--------------------------- >TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > > > > -- Dave Cramer http://www.postgresintl.com 519 939 0336 ICQ#14675561