Re: INSERT ... ON CONFLICT syntax issues - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: INSERT ... ON CONFLICT syntax issues
Date
Msg-id 20150428164254.GS30322@tamriel.snowman.net
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT syntax issues  (Peter Geoghegan <pg@heroku.com>)
Responses Re: INSERT ... ON CONFLICT syntax issues
List pgsql-hackers
* Peter Geoghegan (pg@heroku.com) wrote:
> On Tue, Apr 28, 2015 at 7:38 AM, Andres Freund <andres@anarazel.de> wrote:
> > On 2015-04-28 16:36:28 +0200, Petr Jelinek wrote:
> >> I am also very sure that every time I'll write this statement I will have to
> >> look into manual for the names of TARGET and EXCLUDED because they don't
> >> seem intuitive to me at all (especially the EXCLUDED).
> >
> > Same here. I don't understand why 'CONFLICTING' would be more ambiguous
> > than EXCLUDED (as Peter argued earlier). Especially given that the whole
> > syntax is called ON CONFLICT.
>
> Because the TARGET and EXCLUDED tuples conflict with each other -
> they're both conflicting.

I agree with that, but how are NEW and OLD ambiguous?  NEW is clearly
the tuple being added, while OLD is clearly the existing tuple.

Now that I think about it though, where that'd get ugly is using this
command *inside* a trigger function, which I can certainly imagine
people will want to do...
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT syntax issues
Next
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT syntax issues