Re: Result Set Cursor Patch

From: Kris Jurka <books(at)ejurka(dot)com>
To: Andy Zeneski <jaz(at)ofbiz(dot)org>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Result Set Cursor Patch
Date: 2004-04-30 16:18:36
Message-ID: Pine.BSO.4.56.0404301115170.23452@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Fri, 30 Apr 2004, Andy Zeneski wrote:
>
> On Apr 30, 2004, at 11:43 AM, Kris Jurka wrote:
>
> > This patch does not support updateable ResultSets (deleteRow,
> > insertRow),
> > but doesn't do anything to prevent a cursor from being used in that
> > case.
>
> I don't recall changing this, if it previously prevented the cursor
> from being used on update, then it should still be the same. I will
> look into this and get it fixed. I don't think PostgreSQL supports
> updateable cursors, so should the JDBC driver throw an exception if you
> try to use updateable with a fetch size > 0, or should it avoid the
> cursor and hope it can handle the results?
>

You didn't, but before a scrollable updateable resultset would fetch all
the rows so it could manipulate them. With a cursor based method you will
be discarding the changes when moving to a new block and when refetching
you won't see them because the cursor won't pick up the changes. The
scrollable updateable case must fall back to fetching all rows instead of
throwing an exception because so many people are already using it.

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-04-30 16:20:58 Re: Result Set Cursor Patch
Previous Message Andy Zeneski 2004-04-30 16:14:31 Re: Result Set Cursor Patch