public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dominique Devienne <[email protected]>
To: Tom Lane <[email protected]>
Cc: David G. Johnston <[email protected]>
Cc: Pavel Stehule <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: CALL and named parameters
Date: Thu, 7 Aug 2025 16:39:03 +0200
Message-ID: <CAFCRh-_FCJNJ3hzutzzFkOSc_zs_rrCG90iFtjUbPt32Y6sVHw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAFCRh-_iLoUtMAtyunw_-O6sgpWo04sOmB38MUVNpuQVSkL_0Q@mail.gmail.com>
<CAFj8pRCyW4E5OnZDGvk_YnPqaS_PfK-VKJOKGndC-gtAtDOtBw@mail.gmail.com>
<CAFCRh-9XkFS==OwSB6jgY84L5d4PkV_Y9MxLgk=NVx0Z8W3o_A@mail.gmail.com>
<CAKFQuwaGO-pmBVc2Vk9vwmbkhNpxHeZM77=oCtG+Duoc-G58cg@mail.gmail.com>
<CAFCRh-8-sKZS7-xFO=Ku0waTjKfm0qhGVWWKZ9qsgzJEcPK7BA@mail.gmail.com>
<[email protected]>
On Thu, Aug 7, 2025 at 4:36 PM Tom Lane <[email protected]> wrote:
> Dominique Devienne <[email protected]> writes:
> > I was expecting an error telling me the procedure exists, but the
> > argument name used in the call didn't. Then it's obvious to me what
> > mistake I made. If argument names don't participate in the function's
> > signature, why should they participate in the lookup? Do the lookup
> > based on name and arg types (and count), that gives you a possible
> > overload set, which in my second attempt (with a ::name cast) WAS AN
> > EXACT MATCH for the signature, then give me an error about the
> > argument name, that does NOT tell me the function doesn't exist.
> > That's what I would expect.
>
> Criticism in the form of a patch is welcome ;-). The problem here
> is that the matching rules are far more complicated than you seem
> to think. It's not clear to me that we can definitively say that
> "we would have had a match except the argument name was wrong".
> If it is possible to know that, it's quite a few subroutines below
> where the error is actually issued (see ParseFuncOrColumn ->
> func_get_detail -> FuncnameGetCandidates -> MatchNamedCall).
> Maybe there's some fairly painless change that could be made in
> that rat's nest, but I lack enough caffeine to see it.
How about listing those "candidates" considered? In the detailed message?
With arg names. Then it would have been obvious(er), I'm arguing. --DD
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: CALL and named parameters
In-Reply-To: <CAFCRh-_FCJNJ3hzutzzFkOSc_zs_rrCG90iFtjUbPt32Y6sVHw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox