Skip site navigation (1) Skip section navigation (2)

Re: BUG #1231: Probelm with transactions in stored code.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: Gaetano Mendola <mendola(at)bigfoot(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1231: Probelm with transactions in stored code.
Date: 2004-08-26 02:46:31
Message-ID: 11422.1093488391@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
> I believe it sees the one that was valid in the snapshot as of the
> beginning of the function.

Actually, the problem is that it can see *both* that row and the updated
row; it's a crapshoot which one will be returned by the SELECT INTO.

The reason this can happen is that we're not doing SetQuerySnapshot
between commands of a plpgsql function.  There is discussion going way
way back about whether we shouldn't do so (see the archives).  I think
the major reason why we have not done it is fear of introducing
non-backwards-compatible behavior.  Seems like 8.0 is exactly the right
version to consider doing that in.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Bellan SaravananDate: 2004-08-26 02:46:44
Subject: Re: Postgres 8.0/Windows 2000 Load testing
Previous:From: Zhong JackyDate: 2004-08-26 02:43:45
Subject: pgsql 8.0 beta1 patch for token and timezone

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group