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

From Tom Lane
Subject Re: INSERT ... ON CONFLICT doesn't work
Date
Msg-id 1990141.1638388378@sss.pgh.pa.us
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT doesn't work  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: INSERT ... ON CONFLICT doesn't work  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: INSERT ... ON CONFLICT doesn't work  ("Jenda Krynicky" <Jenda@Krynicky.cz>)
List pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Wed, Dec 1, 2021 at 12:21 PM Jenda Krynicky <Jenda@krynicky.cz> wrote:
>> THERE IS NO (CENSORED) VARIABLE "Uuid"!

> Yes, there is.  RETURNS TABLE (... "Uuid" text ... )

> Changing that to something else should remove the ambiguity.  I agree it is
> not an ideal solution though.  I'm not sure what other options exist though.

The variable_conflict options that Adrian pointed to are one way out.

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"))

            regards, tom lane



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: case insensitive collation of Greek's sigma
Next
From: "David G. Johnston"
Date:
Subject: Re: INSERT ... ON CONFLICT doesn't work