Re: patch: enforce the requirements for scrollable resultsets

From: Kris Jurka <books(at)ejurka(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: patch: enforce the requirements for scrollable resultsets
Date: 2004-04-02 06:55:04
Message-ID: Pine.BSO.4.56.0404020151330.29801@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 1 Apr 2004, Oliver Jowett wrote:

> This patch (against CVS HEAD) adds enforcement of the requirement that
> you're working with a scrollable resultset before calling some methods
> (last(), absolute(), etc) of ResultSet. Without this patch, these
> methods complete "normally" but can return incorrect data if the
> resultset is backed by a cursor. It also adds tests for this behaviour,
> and fixes a number of tests and one case in the driver itself that try
> to use these methods with the wrong resultset type.
>

Patch applied. I also added a check for Statement.setFetchDirection being
a valid direction.

I believe this still doesn't complete our checking for cursor based
ResultSets because of methods like isBeforeFirst() or isLast(), which
don't require scrollable ResultSets, but the code must be aware if it
is working with a cursor.

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message scott.marlowe 2004-04-02 15:54:55 Re: disabling seq scans
Previous Message Tom Lane 2004-04-02 04:16:21 Re: disabling seq scans