Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT
Date
Msg-id CAH2-Wz=AqNjjTuVZxj_CfbS9PJG437UOeb44R-AyFtvuhRAunA@mail.gmail.com
Whole thread Raw
In response to Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT
List pgsql-hackers
On Fri, Jul 1, 2022 at 6:01 AM Robert Haas <robertmhaas@gmail.com> wrote:
> 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"
>
> That could also help people who encounter this error in other
> situations. I'm not 100% sure this is a good idea, but I feel like it
> would have a much better chance of helping someone in this situation
> than the proposed doc patch.

I agree with everything you've said here, though I am 100% sure that
something like your proposed HINT would be a real usability win.

The "Perhaps you meant to reference the column" HINT displayed when
the user misspells a column is a surprisingly popular feature. I'm
aware of quite a few people singing its praises on Twitter, for
example. That hardly ever happens, even with features that we think of
as high impact major features. So evidently users really value these
kinds of quality of life improvements.


--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: "Brindle, Joshua"
Date:
Subject: Re: [PoC/RFC] Multiple passwords, interval expirations
Next
From: Peter Eisentraut
Date:
Subject: Re: Refactor construct_array() and deconstruct_array() for built-in types