Re: JDBC Large ResultSet problem + BadTimeStamp Patch - Mailing list pgsql-interfaces

From Peter Mount
Subject Re: JDBC Large ResultSet problem + BadTimeStamp Patch
Date
Msg-id Pine.LNX.4.21.0010111707290.8388-100000@maidast.demon.co.uk
Whole thread Raw
In response to JDBC Large ResultSet problem + BadTimeStamp Patch  (Michael Stephenson <mstephenson@tirin.openworld.co.uk>)
List pgsql-interfaces
On Wed, 11 Oct 2000, Michael Stephenson wrote:

> Two things.
> 
> Firstly, when dealing with a large ResultSet (about 120000 rows), I get a
> null pointer exception on the line:
>    wasNullFlag = (this_row[columnIndex - 1] == null);
> Whenever I call getString(), has anyone else had this? And does anybody
> have a solution?

Are you getting any out of memory errors at all?

The problem with the current implementation is that it reads the entire
result into memory, so 120000 rows may be filling up your VM's memory
(defaults to about 16Mb).

Does it occur if you add the -mx argument to java, ie:
java -mx 64m uk.org.retep.sql.RetepSQL

I'm in the design stage of implementing a version of ResultSet that will
use cursors, to limit how much is loaded in memory at a time.

> Secondly, I've not seen it mentioned on here but the jdbc driver will
> sometimes throw a bad time stamp exception when you use getTimeStamp() on
> times which have are accurate to more than a second, this is the patch we
> use to fix it.

This was fixed a few weeks ago and should be in the current CVS already.

peter

-- 
Peter T Mount peter@retep.org.uk http://www.retep.org.uk
PostgreSQL JDBC Driver http://www.retep.org.uk/postgres/
Java PDF Generator http://www.retep.org.uk/pdf/




pgsql-interfaces by date:

Previous
From: Michael Stephenson
Date:
Subject: JDBC Large ResultSet problem + BadTimeStamp Patch
Next
From: David Diller
Date:
Subject: accessing arrays from jdbc