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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Dominique Devienne <ddevienne(at)gmail(dot)com>
Subject: Re: Identifying function-lookup failures due to argument name mismatches
Date: 2025-08-14 19:18:51
Message-ID: 468738.1755199131@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Another thing not to like is that it seems like this is doing violence
> to several APIs in exchange for not very much improvement in the error
> messages. I feel like maybe we ought to be trying for more
> specificity about additional cases, but I'm not very sure what else
> to improve or what the API could look like.

I couldn't quite let go of this, and after some thought I hit on the
idea of making FuncnameGetCandidates pass back a bitmask of flags
showing how far the match succeeded. This seems to work pretty
nicely, allowing quite-detailed reports with only minimal added
overhead or code restructuring. There's probably room for further
improvement, but it has less of a whiff of "quick single-purpose
hack". See draft commit message for more details.

regards, tom lane

Attachment Content-Type Size
v2-0001-Provide-more-specific-error-hints-for-function-lo.patch text/x-diff 34.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matheus Alcantara 2025-08-14 19:22:49 Re: Eager aggregation, take 3
Previous Message Peter Geoghegan 2025-08-14 19:15:02 Re: index prefetching