Re: second DML operation fails with updatable cursor

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: second DML operation fails with updatable cursor
Дата
Msg-id 1193250208.4242.166.camel@ebony.site
обсуждение исходный текст
Ответ на Re: second DML operation fails with updatable cursor  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-hackers
On Wed, 2007-10-24 at 18:29 +0100, Heikki Linnakangas wrote:

> >> FETCH RELATIVE 0 re-fetches the current row according to the
> manual.
> > 
> > The question is what's the current row, remembering that we've
> always
> > defined our cursors as INSENSITIVE.
> 
> I tried to find an answer to that in the spec. I'm pretty you're
> supposed to see the changes of UPDATEs done through the same cursor,
> using WHERE CURRENT OF, even with insensitive cursors. I have no idea
> how we could implement that, though.

AFAICS in all cases I can find, SCROLLABLE => INSENSITIVE => no UPDATEs.

ISTM we should just restrict Updateable cursors to be non-scrollable,
plus force non-scrollable if the user hasn't specified scrollability but
has specified updateability. That makes sense, since currently we
restrict updateable cursors to not be also specified WITH HOLD. 

If we work out a way that makes sense then we can extend the behaviour
in the next release to include scrollable && updateable at the same
time.

That catches all the problems raised here, I believe.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: second DML operation fails with updatable cursor
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: second DML operation fails with updatable cursor