From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Jenda Krynicky <Jenda@krynicky.cz>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: INSERT ... ON CONFLICT doesn't work
Date: Wed, 01 Dec 2021 14:52:58 -0500
Message-ID: <1990141.1638388378@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwa1+rKkPWxJU=SUsVThUG3GEt6PyKMiU9OL0QOYm1-Yrw@mail.gmail.com>
References: <61A7CB18.20091.3401B246@Jenda.Krynicky.cz>
<CAKFQuwa1+rKkPWxJU=SUsVThUG3GEt6PyKMiU9OL0QOYm1-Yrw@mail.gmail.com>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, Jenda@krynicky.cz
Subject: Re: INSERT ... ON CONFLICT doesn't work
In-Reply-To: <1990141.1638388378@sss.pgh.pa.us>
References: <61A7CB18.20091.3401B246@Jenda.Krynicky.cz> <CAKFQuwa1+rKkPWxJU=SUsVThUG3GEt6PyKMiU9OL0QOYm1-Yrw@mail.gmail.com> <1990141.1638388378@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox