You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
returns (
rowcount integer
)
as
declare variable id bigint;
declare crsr cursor for (
select id from test_table
);
begin
insert into test_table(id) values(1);
-- suspend;
open crsr;
fetch crsr into :id;
rowcount = row\_count;
suspend;
close crsr;
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.
Submitted by: @dmitry-starodubov
Is related to CORE5781
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
returns (
rowcount integer
)
as
declare variable id bigint;
declare crsr cursor for (
select id from test_table
);
begin
insert into test_table(id) values(1);
-- suspend;
end^
set term ;^
select * from test_cursor;
Commits: 690b057 2c79672
The text was updated successfully, but these errors were encountered: