> -----Original Message-----
> From: ed [mailto:ed]On Behalf Of Ed Loehr
>
> Hiroshi Inoue wrote:
> >
> > You should call SET TRANSACTION immediately after BEGIN.
> > Note that SET TRANSACTION .. is per transaction command.
> >
> > PostgreSQL's SERIALIZABLE isolation level would allow both inserts.
> > READ COMMITED isolation level wouldn't allow A's inserts.
>
> 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.
>
Hmm,the magic query ???
Snapshot may be created when the first query is issued though
I don't remember well.
>
> This sequence, AFAICT, appears to fail the SERIALIZABLE standard, allowing
> A to see effects from B that permute the serializability...
>
AFAIK,serializability doesn't imply permutability.
Regards.
Hiroshi Inoue
Inoue@tpf.co.jp