From: Tom Lane <tgl@sss.pgh.pa.us>
To: 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 15:15:09 -0500
Message-ID: <1991643.1638389709@sss.pgh.pa.us> (raw)
In-Reply-To: <61A7D54B.4950.34298622@Jenda.Krynicky.cz>
References: <61A7CB18.20091.3401B246@Jenda.Krynicky.cz>
<CAKFQuwa1+rKkPWxJU=SUsVThUG3GEt6PyKMiU9OL0QOYm1-Yrw@mail.gmail.com>
<1990141.1638388378@sss.pgh.pa.us>
<61A7D54B.4950.34298622@Jenda.Krynicky.cz>
"Jenda Krynicky" <Jenda@Krynicky.cz> writes:
> From: Tom Lane <tgl@sss.pgh.pa.us>
>> 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"))
> ERROR: invalid reference to FROM-clause entry for table "Lockers"
> LINE 3: ON CONFLICT (("Lockers"."Uuid"))
> ^
> HINT: There is an entry for table "Lockers", but it cannot be
> referenced from this part of the query.
Hmm, sorry, I'd tested that in HEAD, but it seems not to work in v13.
Looking closer, I think it was a not-mentioned-in-the-commit-log
side-effect of [1]. Anyway, seems like you need to fall back on
variable_conflict in v13.
regards, tom lane
[1] https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=6c0373ab7
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, Jenda@Krynicky.cz
Subject: Re: INSERT ... ON CONFLICT doesn't work
In-Reply-To: <1991643.1638389709@sss.pgh.pa.us>
References: <61A7CB18.20091.3401B246@Jenda.Krynicky.cz> <CAKFQuwa1+rKkPWxJU=SUsVThUG3GEt6PyKMiU9OL0QOYm1-Yrw@mail.gmail.com> <1990141.1638388378@sss.pgh.pa.us> <61A7D54B.4950.34298622@Jenda.Krynicky.cz> <1991643.1638389709@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