Re: Identifying function-lookup failures due to argument name mismatches

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Tom Lane <tgl@sss.pgh.pa.us>, Dominique Devienne <ddevienne@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-08-27T15:42:27Z
Lists: pgsql-hackers
On 24.08.25 20:47, Tom Lane wrote:
> Here is a v4 with some additional bike-shedding on the error texts.
> In particular, I decided that it was worth expending an additional
> flag bit so that we could reliably distinguish "There is no function
> of that name" from "A function of that name exists, but it is not in
> the search_path".  (Since FuncnameGetCandidates is already searching
> the entire set of functions matching the given name, it doesn't take
> any extra work to know that there's a match outside the search path.)
> I rephrased a couple of the other messages too, but without any
> substantive logic change.

I only gave it a quick review right now.  I have also been wanting to 
make the function lookup error messages more specific, so I like this 
direction very much.  The wording of the messages looks good and more 
useful than before.



Commits

  1. Provide more-specific error details/hints for function lookup failures.