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

Re: absolute positioning

From: Indra Heckenbach <indra(at)macnica(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: absolute positioning
Date: 2004-03-22 03:01:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Thanks for the info.  So the implementation is functional, but does so 
by preventing cursors.  Unfortunately, I am dealing with a large result 
set, so I need to use cursors.  I started modifying the jdbc driver.  
Any other suggestions?


Oliver Jowett wrote:

> Indra Heckenbach wrote:
>> Hi,
>> After reviewing the JDBC API, I thought absolute() was intended to 
>> reposition the cursor across the entire result set.  Looking at the 
>> pgjdbc implementation though, it appears to be positioning the cursor 
>> in the cached results, which may be a subset of all results if 
>> setFetchSize() != 0.   I assume the implementation should be doing 
>> "FETCH ABSOLUTE pos".  If this is true, comparable methods are also 
>> not correctly implemented for this case.  Is this an issue, or am I 
>> misinterpreting the API?
> You need to be using a scrollable resultset for absolute() to be 
> available (although it looks like the current driver does not enforce 
> this). If a scrollable resultset is requested, the driver disables the 
> use of cursors regardless of the current fetchsize, so the "cached" 
> resultset is always the complete resultset and there is no problem.
> This behaviour is an interim measure until a proper implementation 
> that deals with scrollable resultsets and cursors correctly gets done. 
> There are some backend issues to sort out first -- some (non-obvious 
> set of) queries produce forward-access-only cursors, IIRC.
> -O

In response to


pgsql-jdbc by date

Next:From: Oliver JowettDate: 2004-03-22 03:26:23
Subject: Re: absolute positioning
Previous:From: Oliver JowettDate: 2004-03-22 02:55:30
Subject: Re: absolute positioning

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