Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uk1SN-00Em4K-1j for pgsql-general@arkaria.postgresql.org; Thu, 07 Aug 2025 14:18:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uk1SL-004z1q-Jd for pgsql-general@arkaria.postgresql.org; Thu, 07 Aug 2025 14:18:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uk1SL-004z1b-9N for pgsql-general@lists.postgresql.org; Thu, 07 Aug 2025 14:18:57 +0000 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uk1SI-001ESn-28 for pgsql-general@lists.postgresql.org; Thu, 07 Aug 2025 14:18:56 +0000 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-30c036641f2so772732fac.2 for ; Thu, 07 Aug 2025 07:18:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754576335; x=1755181135; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HzgkET9WUWr8A+3aTSmjhtOzGwQ4HaHZr/CtUAqED2g=; b=k1YvQIz5Ua6q5sgQU5kXPxHYbHNgDxE34kZjCtNUWiPKi8Ig3ti1zyTQIlObRgeNKz lHfSr35TYI2eP5f2ngj6jVXIWp9yaOximLjzII8qzqMId+pOEiYH4DW+KZ4dQqoXp6qM d6wXKdgCHstLr/EUZFt9rQmXS7LM6HvqG0/p02BF79bRYXicGKJPWuSo1Dk7A1GNxFdk 8f0QV0qZPZRJsoB0zzfbtBvKC64pS/IG0Ul2cptBYKGXu7s8XXRAmI/dvJ1AHpAPZ1DV ZqyFsf5fE5QP4QYLhaFA42mI8nzxur5urycvhQsLHxILVcbyS2Ze75lj5UEg3SwQU8uH jMjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754576335; x=1755181135; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HzgkET9WUWr8A+3aTSmjhtOzGwQ4HaHZr/CtUAqED2g=; b=XMJhyG+H8VsJioeGEyk+XcbP0nSQMb8Qqub1WgC6m4lJMo2qricVffhV3J1pUHyr9v nvKmoFyFoz3jNYZb/Sxt7yy7JUQdrYDmksjS5t8EghFqEgWtUe7eZ5WHPiMCg+yzM+W1 m6trFI4czOeqXu80B8bqa4XRzSEYudz0PJybyONRZtpTQRkFYHBNxf5/71o4EQKxdslx MGO7e3FlZO63yuoQPG6PNRFfkvSoSAUiJM7exR69E6SGJu0Ca6x19+FOTuWCNnDTiq15 d/Mk2aKIRWT/RuYxg0ADTDtlqQvTENm2NUVtnMnsK034pVc2m/byGhkC6FPpSQrIX4hf 3/fg== X-Forwarded-Encrypted: i=1; AJvYcCVvrOC8OUAUkHWQ0uBJDfVrtNLPu2Xs5zBjlGKKQ7fFxOeYMVD88N2JwXNGBL0Pmv0L1sXy4EAJL5PCMBYg@lists.postgresql.org X-Gm-Message-State: AOJu0YxEkRoumjdZpyUWKbmeH512yc7BaxeGLczwcFUfZTtpwmsgDXk+ wRnBJdT3s8SpcxGpEvnBlQpGur4XSvg2Kljxyvt42LIPOu8gCQ5AEU/kc9nXSgy3HRaX12UArUd I0tC8GwpUimvfytP3vcZPUbvGAAbGr4/ICkue X-Gm-Gg: ASbGncuoBl2ODiFubEj/X54bFwFEPLBOU1mcyBAqG8WrG7baEZwOpyjGtU7x3oudvSi CwbI/+LJxmj0x8wpxAAJ663a/0LpOeAmOmXzknEO602+lCT4ME8ZLGTr3c0CN4yv2ZeKDoBcbts vC+K/LcvROEJ3DVbH3VLbUyEeJZ1JksLfnN3eKjnQCihxr6jgUNvtv06LX4VVTg2fQm74HDK+jb W3HQBz9Og== X-Google-Smtp-Source: AGHT+IFlxF2q39FV1+23QzFkkSywZaNmv7paoLRJlQuQafm3Ni47YmZ37B4Q38oefnZcigq1U3hjmDkWZhlvNDQyjkc= X-Received: by 2002:a05:6808:bc8:b0:434:1191:7e9d with SMTP id 5614622812f47-4359447e465mr103936b6e.0.1754576334684; Thu, 07 Aug 2025 07:18:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dominique Devienne Date: Thu, 7 Aug 2025 16:18:43 +0200 X-Gm-Features: Ac12FXw0Sk3ME8b1CG8d-kr1JLtBX0APkmXMpL6Km8CIeWQGv7ETl93fpMPtT5E Message-ID: Subject: Re: CALL and named parameters To: "David G. Johnston" Cc: Pavel Stehule , "pgsql-general@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Aug 7, 2025 at 3:30=E2=80=AFPM David G. Johnston wrote: > On Thursday, August 7, 2025, Dominique Devienne wro= te: >> Can you overload a function solely by changing an argument name? > No, the signature is only the name and input argument types. Thanks for confirming. >> So the function did exist, with the correct "signature". >> And I was "just" using the wrong arg-name. That tripped me up. > > How is it =E2=80=9Cjust=E2=80=9D an argument name when you are using name= d argument syntax? 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. Now, as a dev, I understand that my own experience is a tiny subcase of a larger problem. I'm sure it can be super complex in the general case. HINT: No procedure matches the given name and argument types. You might need to add explicit type casts. in "given name and argument types", `name` applies to the procedure name? Was how I read it. Or it ALSO applies to types too (wasn't my interpretation). The hint mentions casts, which I tried, to no avail. The hint does NOT mention check the arg-names, especially since it knows I'm using named-arguments at the call side. I'm saying that's a poor user experience. Yes it's my error. I should have known better, yadi yadi yada. When you try to DROP an object with privileges on some objects, it lists you those objects. Here, it doesn't even lists you the candidates from the overload set. With param names, if using named argument. We can agree to disagree. PostgreSQL is OSS and all. I'm just telling you, and the community at large, that this error is misleading IMHO, and that it tripped me up, and I'm making noise in the hope it gets improved, so the next user (probably me!) that runs into it next, has a better chance of not wasting a few hours on that one. Thanks, --DD