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 22B2A32A0FC for ; Tue, 19 Oct 2004 08:20:23 +0100 (BST) 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 82748-01 for ; Tue, 19 Oct 2004 07:20:14 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 0BCA032A0BC for ; Tue, 19 Oct 2004 08:20:15 +0100 (BST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i9J7KDJ7082791 for ; Tue, 19 Oct 2004 07:20:13 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i9J6rq1h075297 for pgsql-jdbc@postgresql.org; Tue, 19 Oct 2004 06:53:52 GMT From: tomas.johansson@agent25.se (Tomas) X-Newsgroups: comp.databases.postgresql.interfaces.jdbc Subject: Re: NullPointerException in ResultSetMetaData getColumnCount Date: 18 Oct 2004 23:53:52 -0700 Organization: http://groups.google.com Lines: 21 Message-ID: <2e107e13.0410182253.74c289af@posting.google.com> References: <2e107e13.0410180639.70aea0e0@posting.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-jdbc@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/198 X-Sequence-Number: 11303 books@ejurka.com (Kris Jurka) wrote in message news:... > On Mon, 18 Oct 2004, Tomas wrote: > > > How can you get metadata from a resultset that is returned from a > > stored function ? > > You need to be running with autocommit off for this to work at all. This > is not just a metadata problem. The problem is that cursors are closed at > commit, which in auto commit mode is before the results can even be > fetched from it. It could definitely use a better error message, the 8.0 > driver gives "ERROR: cursor "" does not exist", but > that's still not very good. > > Kris Jurka Thank you Kris for your answer. I was using the 7.4 version of the driver since the PostgreSQL version I am using is 7.4.5 but now I tested the 8.0 driver and then the metadata seems to work. Regarding the 7.4 driver it did not help to change the autocommit. / Tomas