Following script returns 0, i.e. PSQL cursor doesn't see the record that was inserted before cursor was opened.
create table test_table (id bigint);
set term ^;
create or alter procedure test_cursor
declare variable id bigint;
declare crsr cursor for (
select id from test_table
insert into test_table(id) values(1);
fetch crsr into :id;
rowcount = row\_count;
Cursor stability based on savepoints\undo-log can't be applied to the explicit cursors, unfortunately.
Therefore "undo" logic is disabled for explicit cursors.
Cursor stability for explicit cursors will be implemented using another way.