Re: [EXT] Re: SCROLLABLE/UPDATABLE cursor question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [EXT] Re: SCROLLABLE/UPDATABLE cursor question
Дата
Msg-id 201144.1682350828@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [EXT] Re: SCROLLABLE/UPDATABLE cursor question  (Garfield Lewis <garfield.lewis@lzlabs.com>)
Список pgsql-general
Garfield Lewis <garfield.lewis@lzlabs.com> writes:
> DECLARE cur0 SCROLL CURSOR FOR SELECT * FROM t0 FOR UPDATE;
> psql:curs.pgs:4: ERROR:  DECLARE SCROLL CURSOR ... FOR UPDATE is not supported
> DETAIL:  Scrollable cursors must be READ ONLY.

Ah.  Yeah, I don't think anyone is contemplating changing that.
Scrollable cursors with side effects would have unpleasant semantic
issues about when do the side-effects happen, and can they happen
multiple times (or, perhaps, not at all if you never read all of
the query output)?  FOR UPDATE would be slightly less messy than
other kinds of side-effects, since it's idempotent; but only slightly.

            regards, tom lane



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

Предыдущее
От: Siddharth Jain
Дата:
Сообщение: what happens if a failed transaction is not rolled back?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: what happens if a failed transaction is not rolled back?