Re: cursors: SCROLL default, error messages - Mailing list pgsql-hackers

From Tom Lane
Subject Re: cursors: SCROLL default, error messages
Date
Msg-id 15974.1048286330@sss.pgh.pa.us
Whole thread Raw
In response to Re: cursors: SCROLL default, error messages  (Greg Stark <gsstark@mit.edu>)
Responses Re: cursors: SCROLL default, error messages
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
Neil Conway <neilc@samurai.com> writes:
> Note that it won't be a noise word: if NO SCROLL is specified, an
> attempt to do a backward fetch on a non-scrollable cursor will yield an
> error.

> Does the spec *require* an error, or merely say that backward fetches aren't
> required to work? 

Actually, what it says is that applications aren't allowed to issue
backwards fetches if they didn't say SCROLL.  This is one of the Syntax
Rules for FETCH (in SQL92, but I imagine SQL99 is the same):
        3) If the implicit or explicit <fetch orientation> is not NEXT,           then the <declare cursor> CR shall
specifySCROLL.
 

AFAICS, our CVS-tip behavior is a reasonable superset of the spec.
We don't have the "NO SCROLL" noiseword (which was not in SQL92 anyway),
but otherwise I'm happy with what's there now.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [INTERFACES] Roadmap for FE/BE protocol redesign
Next
From: Tom Lane
Date:
Subject: Re: A bad behavior under autocommit off mode