From: Dave Cramer <pg@fastcrypt.com>
To: leo <usenet@workfile.de>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: PGResultSetMetaData
Date: Sun, 23 Jan 2005 15:10:34 -0500
Message-ID: <41F404BA.2020801@fastcrypt.com> (raw)
In-Reply-To: <tl7l0tocpvg6.1rfovtffloi2o.dlg@40tude.net>
References: <kr5so79kvul8$.1haqd7ypkt8g9$.dlg@40tude.net>
<01c701c50182$47c05350$7500000a@KALIO>
<tl7l0tocpvg6.1rfovtffloi2o.dlg@40tude.net>
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
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@fastcrypt.com, usenet@workfile.de
Subject: Re: PGResultSetMetaData
In-Reply-To: <41F404BA.2020801@fastcrypt.com>
References: <kr5so79kvul8$.1haqd7ypkt8g9$.dlg@40tude.net> <01c701c50182$47c05350$7500000a@KALIO> <tl7l0tocpvg6.1rfovtffloi2o.dlg@40tude.net> <41F404BA.2020801@fastcrypt.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