Re: cursors: SCROLL default, error messages

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: cursors: SCROLL default, error messages
Дата
Msg-id 87u1dw74j2.fsf@stark.dyndns.tv
обсуждение исходный текст
Ответ на Re: cursors: SCROLL default, error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: cursors: SCROLL default, error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Neil Conway <neilc@samurai.com> writes:
> > On Fri, 2003-03-21 at 12:12, Tom Lane wrote:
> >> (No problem here with adding the noise-word option, of course.)
> 
> > 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? 

Most specs don't impose many restrictions on what happens if the user does non
conformant things. The SQL spec is a bit, er, nonstandard in that respect, but
even for it I'm a bit surprised that it would explicitly say that if NO SCROLL
is specified that backward fetches have to produce an error.

The only possible rationale I could see for the spec imposing that kind of
restriction would be a security concern if an middleware layer allocates a NO
SCROLL cursor, pages forward, and then allows an upper tier to do unrestricted
operations on that cursor trusting the database not to allow scrolling back.

--
greg



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Barry Lind
Дата:
Сообщение: Re: A bad behavior under autocommit off mode
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: A bad behavior under autocommit off mode