pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tomas.johansson@agent25.se
To: pgsql-jdbc@postgresql.org
Subject: Re: NullPointerException in ResultSetMetaData getColumnCount
Date: 18 Oct 2004 23:53:52 -0700
Message-ID: <2e107e13.0410182253.74c289af@posting.google.com> (raw)
References: <2e107e13.0410180639.70aea0e0@posting.google.com>
	<Pine.BSO.4.56.0410181515590.5115@leary.csoft.net>

books@ejurka.com (Kris Jurka) wrote in message news:<Pine.BSO.4.56.0410181515590.5115@leary.csoft.net>...
> 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 "<unnamed portal 1>" 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



view thread (3+ messages)

Message-ID: <2e107e13.0410182253.74c289af@posting.google.com>
Permalink:  ../2e107e13.0410182253.74c289af@posting.google.com/
Also on:    postgresql.org/message-id/2e107e13.0410182253.74c289af@posting.google.com

 · 

reply

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: tomas.johansson@agent25.se
  Subject: Re: NullPointerException in ResultSetMetaData getColumnCount
  In-Reply-To: <2e107e13.0410182253.74c289af@posting.google.com>
  References: <2e107e13.0410180639.70aea0e0@posting.google.com> <Pine.BSO.4.56.0410181515590.5115@leary.csoft.net> <2e107e13.0410182253.74c289af@posting.google.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