Re: pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE. - Mailing list pgsql-committers

From Peter Geoghegan
Subject Re: pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.
Date
Msg-id CAM3SWZSyi=usLD5k1253=dUKHsbLZUnH5EqC4qwAbQ05Cs7iNA@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE.  (Thom Brown <thom@linux.com>)
List pgsql-committers
On Mon, May 11, 2015 at 1:49 AM, Thom Brown <thom@linux.com> wrote:
> I haven't had time for a proper read of this patch, but I did
> immediately notice this:
>
> HINT:  For example, ON CONFLICT ON CONFLICT (<column>).
>
> This should perhaps either be:
>
> HINT:  For example, ON CONFLICT (<column>).
>
> or
>
> HINT:  For example, ON CONFLICT ON CONSTRAINT <constraint_name>.
>
> But at the moment it seems to be neither.

What I'd intended here was the first suggestion of yours. Initially,
it was actually a combination of Thom's two suggestions, but this was
messed up at some point.

What I suggest is that this be changed to match the first suggestion
here (the intended message), since the "ON CONSTRAINT ... " variant is
really just an escape hatch that I don't expect will see much use. I
tried to encourage use of the conventional inference mechanism
everywhere.

--
Peter Geoghegan


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: pg_upgrade: use single or double-quotes in command-line strings
Next
From: Stephen Frost
Date:
Subject: pgsql: Allow LOCK TABLE .. ROW EXCLUSIVE MODE with INSERT