Subject Re: [firebird-support] Re: FOR SELECT resultset changed during update statement
Author Paul Vinkenoog

> > Anyway thanks for help Kjell. At-least now i know it's been for ages and
> > that it is a bug and i have to do some workarounds.
> If I'm not mistaken, it's not really a bug. But it is a deviation from
> standard.

If I'm not mistaken, it's not even a deviation from the standard.

The SQL standard recognizes sensitive, insensitive and asensitive cursors:
- sensitive: changes are visible to the cursor
- insensitive: changes are not visible to the cursor
- asensitive: whether changes are visible or not is implementation-dependent

The default is asensitive.

If FOR UPDATE is specified, then only sensitive and asensitive are allowed.

(This is from a rather quick browse-through of the SQL-2003 standard. If you
want to be sure, consult it yourself and invest more time than I did.)

Not so long ago there was a thread in fb-devel or fb-support about cursor
sensitivity. The situation was a little different in that it concentrated
on changes in PSQL variables rather than in table data, but it may be
worthwhile to look it up. The most recent versions of our LangRef Updates
warn against possible effects of changes in PSQL variables (in the sections
DECLARE CURSOR and FOR SELECT). They say nothing (yet) about SQL data

Paul Vinkenoog