Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 51A0D9FB564 for ; Mon, 23 Jul 2007 12:55:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 30880-04 for ; Mon, 23 Jul 2007 12:55:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from beaver.fastcrypt.com (beaver.fastcrypt.com [64.7.141.17]) by postgresql.org (Postfix) with ESMTP id 7FC6F9FA43D for ; Mon, 23 Jul 2007 12:55:34 -0300 (ADT) Received: from [192.168.1.14] (dcdsl.ebox.com [64.7.143.116]) by beaver.fastcrypt.com (Postfix) with ESMTP id 34B9B158062C; Mon, 23 Jul 2007 12:10:30 -0400 (EDT) In-Reply-To: <153540364@web.de> References: <153540364@web.de> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <50909C4A-7845-482F-9F61-7BF1D4B3FE64@fastcrypt.com> Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: Problem with ResultSet retrieved with SELECT * FROM pg_indexes WHERE tablename Date: Mon, 23 Jul 2007 11:55:32 -0400 To: Stefan Zweig X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/104 X-Sequence-Number: 17278 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