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 1ujiZi-00BC5s-1h for pgsql-general@arkaria.postgresql.org; Wed, 06 Aug 2025 18:09:18 +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 1ujiZh-0001e7-2F for pgsql-general@arkaria.postgresql.org; Wed, 06 Aug 2025 18:09:17 +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 1ujiZg-0001ds-JT for pgsql-general@lists.postgresql.org; Wed, 06 Aug 2025 18:09:16 +0000 Received: from mail-yw1-x112b.google.com ([2607:f8b0:4864:20::112b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ujiZd-0015DK-2D for pgsql-general@lists.postgresql.org; Wed, 06 Aug 2025 18:09:15 +0000 Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-718389fb988so1262927b3.1 for ; Wed, 06 Aug 2025 11:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754503754; x=1755108554; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oTGe0clS5P5j5wYRfKqBfcuZJfkgj6LOzER8keAO+bE=; b=E+uML/W53yLCtCymhHucW5dwMD6JBkGy3Tu0Gk6IxSLST6Xef2KhvhxlsWWJ6GVjyx zvGshLbRAg9jnaZzIhHz7U+SxvNTIFWP6WqVZv/4SBQOVYIGi+1lmG1JqnqVP/Efdq8w RTwD/ZsiptLXj41ewAsR/+6dhqyDGrTPmV4vR5N7qKFeBCwQBsOUQXu7Kcl6YYk/7JK4 9V2DPApus4wKuMIg4TpQiAbhYV4OpTlx5aXdMUKQJgl7IJNVVSNC9/DrsmVC5zXmyb2L xIokLVrcJ3F2xO+co5dE16Y41F90ebTyh4riwnHtSY7UPFMy3RR+soJyj7wutO4zI1lg +p7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754503754; x=1755108554; h=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=oTGe0clS5P5j5wYRfKqBfcuZJfkgj6LOzER8keAO+bE=; b=LVMmzeYUHTwVJQ34V4WQ7PvKa2oyscKnJjqAcYX9mG5uPW+hVs40kHjEqkM+vPXKSq WC/SifHyGK+C41ZHYJoF5WfwC7rxYwaHXyEda6ung8tKrkAYsECvqN/yphJA8ShdaqeI /rUwWq7CsHLv2w9wlTldl9uniidvBqWUF4inuaHwiWHiLH0WslyEm3CceAxgG79ssm2u osd+omcc0emPOJiWDvmqQ8Mtd7ao0VL6wdhboI+0y0ApaxGREIWXG5PuB4G/8SJCkI/I 0TGMCT2OQBVpef7jFkowriB5Zk8YrXQfzSk/Tx2wF7CBbfyHpr0PQWA5QLwgaXkRxxMR DI7w== X-Gm-Message-State: AOJu0YynoSESx0gOWc5p03gMaBBhXfNQXJEgp3m6o96rQK2JALRolRe+ 9tc3l0LQE92yDXL5Z6TxHgNRNChmaWWFnIdNmpkoeug7q6mlN0dvqJu1D3RqXnQy88VqQb1GmrK efkbQNyJlSkdl+cBqAsvKbNRTRDboVmQ= X-Gm-Gg: ASbGncvnEOOgatPufFPynWhPMOvuz6lI7e1PBJjDc0s1bpZuagHJLhyFsB3hEo8Iv0t 1fHC4GShbOxK9pMICe29AOPsROCwseeWMDXJ0xLKdr0pwNq2wwOmkQTPmBD8+9JCHenPGzZvFdl WuB+IyVTdOjqVodhYVtAeTNbAUFabUq59q26g5eAjnH80IW+rDs5JvTOFux9AINjo0FJV9VylrW rUXtXqJbL0fXua0GLH5TedmF04zYIilGbl5rs6B X-Google-Smtp-Source: AGHT+IERGhVqe3pkPZdUgtpi28fb/wrJQcDyN9csfql0ShghiGLWy23uzSR6sCC87UyFESWZoGFlZy4EJJ/qhXOhj1I= X-Received: by 2002:a05:690c:490f:b0:719:61b8:ffd7 with SMTP id 00721157ae682-71bc9718277mr58248197b3.16.1754503753653; Wed, 06 Aug 2025 11:09:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pavel Stehule Date: Wed, 6 Aug 2025 20:08:36 +0200 X-Gm-Features: Ac12FXzjWmvXn26WvJvktIlIFJ9VY8PTJ2w8cdYdHCRPjJLZpjWnmWVMY7SgpgY Message-ID: Subject: Re: CALL and named parameters To: Dominique Devienne Cc: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000fe6317063bb63c44" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000fe6317063bb63c44 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi st 6. 8. 2025 v 19:49 odes=C3=ADlatel Dominique Devienne napsal: > (sorry, this is a rant...). > > Was getting an error calling a procedure > > ERROR: procedure ... does not exist > HINT: No procedure matches the given name and argument types. You > might need to add explicit type casts. > > I verify USAGE on the SCHEMA of the proc. OK. > I verify EXECUTE on the FUNCTION. OK. > I verify the names of the parameters, in my CALL with named arguments. OK= . > > Turns out, thanks to ChatGPT for clueing me in, CALL does NOT support > named parameters. And it's about the least helpful error message > PostgreSQL could have provided IMO. I'd expect something much better > in this specific case, FWIW. > > That's two unhelpful error messages in a short time :). > > Thanks, and again sorry for the rant. Wasted time on this. --DD > I think so ChatGPT is wrong (2025-08-06 20:04:34) postgres=3D# create or replace procedure foo(a int, b numeric) postgres-# as $$ begin postgres$# raise notice 'a: %, b: %', a, b; postgres$# end; postgres$# $$ language plpgsql; CREATE PROCEDURE (2025-08-06 20:05:15) postgres=3D# call foo(10,20); NOTICE: a: 10, b: 20 CALL (2025-08-06 20:05:20) postgres=3D# call foo(10,b=3D>20); NOTICE: a: 10, b: 20 CALL (2025-08-06 20:05:26) postgres=3D# call foo(a=3D>10,b=3D>20); NOTICE: a: 10, b: 20 CALL (2025-08-06 20:05:33) postgres=3D# create or replace procedure foo1(a int, = b numeric default 0.0) as $$ begin raise notice 'a: %, b: %', a, b; end; $$ language plpgsql; CREATE PROCEDURE (2025-08-06 20:05:49) postgres=3D# call foo1(a=3D>10); NOTICE: a: 10, b: 0.0 CALL (2025-08-06 20:05:57) postgres=3D# call foo(b=3D>20, a=3D>10); NOTICE: a: 10, b: 20 CALL (2025-08-06 20:06:13) postgres=3D# Maybe there is another issue? Can you send an example? Regards Pavel --000000000000fe6317063bb63c44 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

st 6. 8. 2025 v=C2=A019:49 od= es=C3=ADlatel Dominique Devienne <ddevienne@gmail.com> napsal:
(sorry, this is a rant...).

Was getting an error calling a procedure

ERROR:=C2=A0 procedure ... does not exist
HINT:=C2=A0 No procedure matches the given name and argument types. You
might need to add explicit type casts.

I verify USAGE on the SCHEMA of the proc. OK.
I verify EXECUTE on the FUNCTION. OK.
I verify the names of the parameters, in my CALL with named arguments. OK.<= br>
Turns out, thanks to ChatGPT for clueing me in, CALL does NOT support
named parameters. And it's about the least helpful error message
PostgreSQL could have provided IMO. I'd expect something much better in this specific case, FWIW.

That's two unhelpful error messages in a short time :).

Thanks, and again sorry for the rant. Wasted time on this. --DD

I think so ChatGPT is wrong

(2025-08-06 20:04:34) postgres=3D# create or replace procedure foo(a int= , b numeric)
postgres-# as $$ begin
postgres$# =C2=A0 raise notice &#= 39;a: %, b: %', a, b;
postgres$# end;
postgres$# $$ language plpg= sql;
CREATE PROCEDURE
(2025-08-06 20:05:15) postgres=3D# call foo(10,= 20);
NOTICE: =C2=A0a: 10, b: 20
CALL
(2025-08-06 20:05:20) postgre= s=3D# call foo(10,b=3D>20);
NOTICE: =C2=A0a: 10, b: 20
CALL
(20= 25-08-06 20:05:26) postgres=3D# call foo(a=3D>10,b=3D>20);
NOTICE:= =C2=A0a: 10, b: 20
CALL
(2025-08-06 20:05:33) postgres=3D# create or= replace procedure foo1(a int, b numeric default 0.0)
as $$ begin
=C2= =A0 raise notice 'a: %, b: %', a, b;
end;
$$ language plpgsql= ;
CREATE PROCEDURE
(2025-08-06 20:05:49) postgres=3D# call foo1(a=3D&= gt;10);
NOTICE: =C2=A0a: 10, b: 0.0
CALL
(2025-08-06 20:05:57) pos= tgres=3D# call foo(b=3D>20, a=3D>10);
NOTICE: =C2=A0a: 10, b: 20CALL
(2025-08-06 20:06:13) postgres=3D#=C2=A0

=
Maybe there is another issue?

Can you send an= example?

Regards

Pavel

=C2=A0
--000000000000fe6317063bb63c44--