Re: INSERT ... ON CONFLICT doesn't work - Mailing list pgsql-general

From David G. Johnston
Subject Re: INSERT ... ON CONFLICT doesn't work
Date
Msg-id CAKFQuwaZ=Jfw0bJDiJTzqXSAR+PvVZC7hpJcXCe8ke8mqzEG1A@mail.gmail.com
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT doesn't work  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
On Wed, Dec 1, 2021 at 12:59 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Wed, Dec 1, 2021 at 12:52 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
It's also possible to qualify the name in the ON CONFLICT clause,
although I think you have to parenthesize it to do so:

... ON CONFLICT (("Lockers"."Uuid"))


This really needs to be confirmed and, if so, better documented on the INSERT page, since adding a schema to the index_column_name does not intuitively turn it into an index_expression which is what the syntax diagram says requires an extra pair of parentheses.


That of course should be adding a table qualifier to the column, not a schema qualifier.  I get why INSERT doesn't really care, the source table is never in question in SQL-land, but as we see here there is a valid need for it in plpgsql.

David J.

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: INSERT ... ON CONFLICT doesn't work
Next
From: "Jenda Krynicky"
Date:
Subject: Re: INSERT ... ON CONFLICT doesn't work