From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT |
Date: | 2022-07-01 14:37:40 |
Message-ID: | CAH2-WzkrN=KZxwGBrjzj1dja5-nYCp5GKBjHxkG_sqmtJ7MCFg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jul 1, 2022 at 6:40 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Brindle, Joshua | 2022-07-01 14:50:56 | Re: [PoC/RFC] Multiple passwords, interval expirations |
Previous Message | Tom Lane | 2022-07-01 13:50:21 | Re: drop support for v9.3 ? |