Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT
Дата
Msg-id CAH2-WzkrN=KZxwGBrjzj1dja5-nYCp5GKBjHxkG_sqmtJ7MCFg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Jul 1, 2022 at 6:40 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > What would probably help more is adding something like this to the
> > error message:
> > HINT: column "b" could refer to any of these relations: "foo", "excluded"
>
> +1, that seems like it could be handy across the board.

The user *will* get a similar HINT if they happen to *also* spell the
would-be ambiguous column name slightly incorrectly:

ERROR:  column "barr" does not exist
LINE 1: ...lict (bar) do update set bar = excluded.bar where barr != 5;
                                                             ^
HINT:  Perhaps you meant to reference the column "foo.bar" or the
column "excluded.bar".

-- 
Peter Geoghegan



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: drop support for v9.3 ?
Следующее
От: "Brindle, Joshua"
Дата:
Сообщение: Re: [PoC/RFC] Multiple passwords, interval expirations