Ed,
I think the lack of SELECT may be the critical item here, with respect to
reconciling pg's behaviour with (some of) it's docs. The documentation
for SET indicates that the snapshot is taken from the first DML
statement (I cannot locate a similar reference in the MVCC dos). This appears
to be consistent with your observation below.
Rex
Ed Loehr writes:
> Even if I call SET after BEGIN, it is not consistent with docs or the
> standard (see pghackers discussion under same subject), as the two scripts
> below seem to demonstrate.
>
> [Rex: There is a subtle difference between your sequence and mine. Insert
> from B first, and don't do any select from A before you attempt the insert,
> as below.]
>
--
Rex McMaster rex@mcmaster.wattle.id.au
http://www.compsoft.com.au/~rmcm/pgp-pk