Re: scrollable cursor support without MOVE statement

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: scrollable cursor support without MOVE statement
Дата
Msg-id 11760.1176764218@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: scrollable cursor support without MOVE statement  ("Simon Riggs" <simon@2ndquadrant.com>)
Ответы Re: scrollable cursor support without MOVE statement
Список pgsql-patches
"Simon Riggs" <simon@2ndquadrant.com> writes:
> On Mon, 2007-04-16 at 18:18 -0400, Tom Lane wrote:
>> There is no change in the default behavior.

> Previously:
> - PL/pgSQL cursors were non-scrollable
> - DECLARE CURSOR cursors were not non-scrollable by default

No, they weren't "non-scrollable", they were the same as the default
case for DECLARE CURSOR.  You just couldn't tell (from within plpgsql
anyway) for lack of any form of FETCH that would exercise backward
motion.

The actual code behavior is, and has been for a long time,

SCROLL -> if plan doesn't handle backwards scan, stick a Materialize
node atop it so it can.

NO SCROLL -> do nothing to plan.  In pquery.c, throw error if an attempt
is made to fetch backwards.

default -> if plan doesn't handle backwards scan, use NO SCROLL behavior.
If it does, silently allow scrolling.

The previous state of affairs was that plpgsql had no way to specify
SCROLL or NO SCROLL and so always got the default behavior.  Now it
does, but the default behavior is still the same.

            regards, tom lane

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

Предыдущее
От: "Simon Riggs"
Дата:
Сообщение: Re: scrollable cursor support without MOVE statement
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] choose_bitmap_and again (was Re: [PERFORM] Strangely Variable Query Performance)