Consider the following test case (taken from portals.sql)
create table tt1(f1 int);
create function count_tt1_v() returns int8 as 'select count(*) from tt1' language sql volatile;
create function count_tt1_s() returns int8 as 'select count(*) from tt1' language sql stable;
begin;
insert into tt1 values(1);
declare c1 cursor for select count_tt1_v(), count_tt1_s();
insert into tt1 values(2);
fetch all from c1;
returns
count_tt1_v | count_tt1_s
-------------+-------------
2 | 2
(1 row)
where as it is supposed to return
count_tt1_v | count_tt1_s
-------------+-------------
2 | 1
(1 row)
We should see vanilla PostgreSQL. This should be a bug.
Q3