Re: Revisited: Transactions, insert unique. - Mailing list pgsql-general

From rmcm@compsoft.com.au
Subject Re: Revisited: Transactions, insert unique.
Date
Msg-id 14599.47327.858251.453598@fellini.mcmaster.wattle.id.au
Whole thread Raw
In response to Re: Revisited: Transactions, insert unique.  (Ed Loehr <eloehr@austin.rr.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: RE: Revisited: Transactions, insert unique.
Next
From: Joachim Achtzehnter
Date:
Subject: Re: Revisited: Transactions, insert unique.