Re: GSOC13 proposal - extend RETURNING syntax - Mailing list pgsql-hackers

From Robert Haas
Subject Re: GSOC13 proposal - extend RETURNING syntax
Date
Msg-id CA+TgmoZ5-s_tCOE-jPgJH0tREARVr3AeGYS07E84ZAnzygVUwQ@mail.gmail.com
Whole thread Raw
In response to Re: GSOC13 proposal - extend RETURNING syntax  (Marko Tiikkaja <marko@joh.to>)
List pgsql-hackers
On Fri, Oct 4, 2013 at 5:04 AM, Marko Tiikkaja <marko@joh.to> wrote:
> I might be completely in the woods here, but I believe something like this
> was attempted by Karol earlier, and it failed if two concurrent transactions
> did something similar to:
>
>   UPDATE foo SET a = a + 1 RETURNING BEFORE.a;
>
> Both of them would see BEFORE.a = 0, because that's what the "a" evaluated
> to from the tuple we got before EvalPlanQual.
>
> But maybe what you're suggesting doesn't have this problem?

Hmm, it probably does.  That explains why there are executor changes
here; I guess they need some comments to explain their purpose.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: pg_stat_statements: calls under-estimation propagation
Next
From: David Rowley
Date:
Subject: pg_dump insert with column names speedup