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-19 23:08:30
Message-ID: 42DD87EE.8090703@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Kevin Grittner wrote:

> I'm curious about the reasons that this appoach was taken -- why not
> return the rows as they are retrieved from the server?

The short answer is because to stream on the fly is a much more complex
approach and no-one has stepped forward to implement it.

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

Another solution here is to work on making the cursor support code more
flexible. Again the main reason that this is not done is that no-one has
come up with a robust implementation yet.

> (2) You might think you've met all the conditions for the cursored
> approach and be wrong. The default behavior might kick in and cause an
> OutOfMemoryError.

The same is true with a streaming approach. The driver likes to issue
its own queries internally in many places; if you happen to trip up on
one of those while processing your resultset, boom!

Your best bet to see this implemented is to implement it yourself and
send us a patch. It's a fairly large chunk of work with debatable
benefit, and personally I'd rather spend the time on better cursor
support. (if I *had* time!)

-O

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2005-07-19 23:08:43 Re: Timestamp Conversion Woes Redux
Previous Message Oliver Jowett 2005-07-19 22:59:23 Re: Timestamp Conversion Woes Redux