Skip site navigation (1) Skip section navigation (2)

Re: Streaming ResultSet

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Streaming ResultSet
Date: 2005-07-20 00:22:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Kevin Grittner wrote:

> The disadvantages of the current default approach are:

> (2)  You might want to see partial results from a query which ultimately
> generates an exception.

I don't see this is something that any sort of portable application is
ever going to need. It's very unpredictable where you get an error if an
error occurs, since it's so dependent on backend / driver / protocol

> The disadvantages of the cursored approach are:

> (1)  It might not be easy to create all of the right conditions for the
> cursored approach to work.

It occurs to me that the only condition that streaming would mitigate is
having to have autocommit off.

You can't usefully use streaming with TYPE_SCROLLABLE_* resultsets as
even though you can stream results just fine while the resultset
current-row is moving strictly forward, you have to keep all previously
retrieved results in memory anyway in case the application asks to move
backwards (perfectly legal with a SCROLLABLE resultset). Keeping the
whole resultset in memory defeats the purpose of streaming in the first


In response to

pgsql-jdbc by date

Next:From: Dave CramerDate: 2005-07-20 00:40:23
Subject: Re: jdbc xa support
Previous:From: Oliver JowettDate: 2005-07-19 23:38:53
Subject: Re: Streaming ResultSet

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group