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

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: (view raw, whole thread or download thread mbox)
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


pgsql-jdbc by date

Next:From: Kris JurkaDate: 2004-04-30 16:20:58
Subject: Re: Result Set Cursor Patch
Previous:From: Andy ZeneskiDate: 2004-04-30 16:14:31
Subject: Re: Result Set Cursor Patch

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