Re: cursors: SCROLL default, error messages

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: cursors: SCROLL default, error messages
Date: 2003-03-21 22:38:50
Message-ID: 15974.1048286330@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <gsstark(at)mit(dot)edu> writes:
Neil Conway <neilc(at)samurai(dot)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 specify SCROLL.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-03-21 22:41:39 Re: A bad behavior under autocommit off mode
Previous Message Bruce Momjian 2003-03-21 22:36:03 Re: [INTERFACES] Roadmap for FE/BE protocol redesign