Re: Fwd: Problem with a "complex" upsert

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mario De Frutos Dieguez <mariodefrutos(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Fwd: Problem with a "complex" upsert
Date: 2018-08-03 23:34:11
Message-ID: CAH2-WzmTn9h8GzbEd4aW8gvs+_gDt_otaFhvud0CTFgpzojpXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-bugs

On Fri, Aug 3, 2018 at 2:40 AM, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> This patch also allows access to view columns that aren't in the
> underlying base relation. The rationale for the result in the new test
> case where it attempts to insert (1,'y') into columns (aa,bb) of the
> view is that the new view row that would have resulted if the insert
> had succeeded is ('y',1,(1,'y')), hence that's what excluded.* should
> be for the view in the "on conflict" action, and there should be no
> problem referring to any part of that excluded view tuple.

I agree with your rationale. And, I don't think that it's just a
theoretical point; it actually really matters to affected users.

--
Peter Geoghegan

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Andres Freund 2018-08-03 23:51:49 Re: Fwd: Problem with a "complex" upsert
Previous Message Peter Geoghegan 2018-08-03 23:14:17 Re: Fwd: Problem with a "complex" upsert

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2018-08-03 23:51:49 Re: Fwd: Problem with a "complex" upsert
Previous Message Peter Geoghegan 2018-08-03 23:14:17 Re: Fwd: Problem with a "complex" upsert