OUCH! I just refered to the definitive documentation (ie. observed behaviour of the software) and yes, 2 pure selects within a single transaction will see changes commited by a concurrent transaction when running in Read Comitted. That's
not what I read the documentation to be saying.
Session A | Session B |
scratch=# create table foo (bar varchar);
CREATE TABLE
scratch=# select * from foo ;
bar
-----
(0 rows)
scratch=# insert into foo (bar) values ('baz');
INSERT 63323 1
scratch=# begin transaction;
BEGIN
scratch=# select * from foo;
bar
-----
baz
(1 row)
|
|
|
scratch=# update foo set bar = 'xyzzy' where bar = 'baz';
UPDATE 1
|
scratch=# select * from foo;
bar
-------
xyzzy
(1 row)
|
|