Garfield Lewis <garfield.le...@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


Reply via email to