Re: Cursors and backwards scans and SCROLL

From: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Cursors and backwards scans and SCROLL
Date: 2003-03-10 15:32:46
Message-ID: 20030310153245.GW98248@xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

On Sun, Mar 09, 2003 at 03:35:11PM -0500, Tom Lane wrote:
>
> 2. Error out only if a backwards fetch is actually attempted on a plan
> tree that can't handle it (which could only happen if SCROLL wasn't
> given). This is efficient and flexible, but it exposes implementation
> details to the user, in that whether an error occurs will depend on
> which plan the system happens to choose.

I wouldn't worry too much about exposing implementation details at
present--the existing situation does the same, except it pretends that
not returning data that should be there isn't an error. Absent any
further documentation, I'd call that a bug that needs to be fixed.

> There are cases where
> identical cursor definitions might allow or not allow backwards fetch
> depending on the planner's choices. Notice though that errors could
> occur only in cases that would silently fail in the present code; so
> existing applications that work reliably would not see such errors.

Would it be possible to give warnings in a narrow superset of the
problematic cases, something along the lines of "I'm scrolling backwards
for you now, but there's no reason why that should work on this same query
tomorrow"?

Jeroen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-03-10 15:41:33 Re: Cursors and backwards scans and SCROLL
Previous Message Bruno Wolff III 2003-03-10 14:54:15 Re: Who puts the Windows binaries on the FTP server?

Browse pgsql-sql by date

  From Date Subject
Next Message Hesham Gowaily 2003-03-10 15:40:53 Execution plan problem
Previous Message Tom Lane 2003-03-10 15:14:27 Re: Optimizing view