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