From: Dave Cramer <pg@fastcrypt.com>
To: Stefan Zweig <stefanzweig1881@web.de>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Problem with ResultSet retrieved with SELECT * FROM pg_indexes WHERE tablename
Date: Mon, 23 Jul 2007 11:55:32 -0400
Message-ID: <50909C4A-7845-482F-9F61-7BF1D4B3FE64@fastcrypt.com> (raw)
In-Reply-To: <153540364@web.de>
References: <153540364@web.de>
On 23-Jul-07, at 11:42 AM, Stefan Zweig wrote:
> hi list,
>
> i hope anybody can help me with this thing:
>
> i tried to select all indexes of a table with the following
> statement via jdbc:
>
> Statement pgstatement;
> Connection pgconnection;
> ...
> pgstatement = pgconnection.createStatement();
>
> query= "SELECT * FROM pg_indexes WHERE tablename ='g_g114'";
> pgresultSet=pgstatement.executeQuery(query);
>
>
> after that i want to step through the ResultSet with
> while(pgresultSet.next())
> {...}
>
> but i get an exception from pgresultSet.next() which says:
>
> org.postgresql.util.PSQLException: DataSource has been closed
>
There should be no problem with the query, although you can get the
indexes from the metadata. Can you try any other query to see if it
fails ?
Dave
>
> what can be the mistake?
>
> i appreciate any help,
>
> thanks, stefan
> _____________________________________________________________________
> Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
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, stefanzweig1881@web.de
Subject: Re: Problem with ResultSet retrieved with SELECT * FROM pg_indexes WHERE tablename
In-Reply-To: <50909C4A-7845-482F-9F61-7BF1D4B3FE64@fastcrypt.com>
References: <153540364@web.de> <50909C4A-7845-482F-9F61-7BF1D4B3FE64@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