Re: INSERT ... ON CONFLICT doesn't work

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: INSERT ... ON CONFLICT doesn't work
Дата
Msg-id 1991643.1638389709@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: INSERT ... ON CONFLICT doesn't work  ("Jenda Krynicky" <Jenda@Krynicky.cz>)
Список pgsql-general
"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



В списке pgsql-general по дате отправления:

Предыдущее
От: "Jenda Krynicky"
Дата:
Сообщение: Re: INSERT ... ON CONFLICT doesn't work
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: INSERT ... ON CONFLICT doesn't work