Re: Identifying function-lookup failures due to argument name mismatches
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Cc: Dominique Devienne <ddevienne@gmail.com>
Date: 2025-08-14T19:18:51Z
Lists: pgsql-hackers
Attachments
- v2-0001-Provide-more-specific-error-hints-for-function-lo.patch (text/x-diff) patch v2-0001
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
Commits
-
Provide more-specific error details/hints for function lookup failures.
- 83a56419457e 19 (unreleased) landed