Re: HELP: How to tame the 8.3.x JDBC driver with a biq query result set - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: HELP: How to tame the 8.3.x JDBC driver with a biq query result set
Date
Msg-id alpine.BSO.2.00.1004151616310.9994@leary.csoft.net
Whole thread Raw
In response to HELP: How to tame the 8.3.x JDBC driver with a biq query result set  (Dave Crooke <dcrooke@gmail.com>)
Responses Re: HELP: How to tame the 8.3.x JDBC driver with a biq query result set  (Dave Crooke <dcrooke@gmail.com>)
List pgsql-jdbc

On Thu, 15 Apr 2010, Dave Crooke wrote:

> I have a huge table I need to do a full table scan on.
>
> 2. When I use setFetchSize(), which is both a JDBC standard and the
> recommendation on the page below ...
>
> http://jdbc.postgresql.org/documentation/83/query.html#query-with-cursor
>
> ... it bails after about 900ms / 100 fetches / a few thousand rows, with the
> following PG internal error:
>
> org.postgresql.util.PSQLException: ERROR: portal "C_14" does not exist
>

I'm guessing that you have committed the transaction so the portal
(backing the query) gets cleaned up.  To keep a portal open across
transactions you need the WITH HOLD option to DECLARE CURSOR.  There is no
way to do that at the protocol level to work with the current query setup
you have.  If that's what you need, you'll need to rewrite it to DECLARE
CURSOR and then issue the FETCHes yourself.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Dave Crooke
Date:
Subject: HELP: How to tame the 8.3.x JDBC driver with a biq query result set
Next
From: Dave Crooke
Date:
Subject: Re: HELP: How to tame the 8.3.x JDBC driver with a biq query result set