Re: Making joins involving ctid work for the benefit of UPSERT

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Making joins involving ctid work for the benefit of UPSERT
Date: 2014-07-18 18:06:08
Message-ID: 20140718180608.GB29260@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-07-18 10:53:36 -0700, Peter Geoghegan wrote:
> On Fri, Jul 18, 2014 at 10:46 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > I think the things that use "wierd" visibility semantics are pretty much
> > all doing that internally (things being EvalPlanQual stuff for
> > INSERT/UPDATE/DELETE and the referential integrity triggers). I don't
> > see sufficient reason why we should break away from that here. Yes,
> > there's stuff that cannot be done when it's done internally, but we can
> > live with those not being possible.
>
> The whole point of what I was proposing was that those semantics would
> only apply to a special tid scan node. Perhaps I missed something, but
> I'm not sure why you'd consider that I was breaking away from that
> here at all.

I don't see why you'd need such a node at all if we had a fully builtin
UPSERT. The whole stuff with ON CONFLICT SELECT FOR UPDATE and then
UPDATE ... FROM c CONFLICTS is too complicated and exposes stuff that
barely anybody will understand, let alone use correctly in queries they
write themselves.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-07-18 18:14:34 Re: Making joins involving ctid work for the benefit of UPSERT
Previous Message Peter Geoghegan 2014-07-18 17:53:36 Re: Making joins involving ctid work for the benefit of UPSERT