Re: patch: enforce the requirements for scrollable resultsets - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: patch: enforce the requirements for scrollable resultsets
Date
Msg-id Pine.BSO.4.56.0404020151330.29801@leary.csoft.net
Whole thread Raw
In response to patch: enforce the requirements for scrollable resultsets  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: patch: enforce the requirements for scrollable resultsets  (Oliver Jowett <oliver@opencloud.com>)
List 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


pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: disabling seq scans
Next
From: "scott.marlowe"
Date:
Subject: Re: disabling seq scans