Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHSF9-0002u3-RM for pgsql-general@arkaria.postgresql.org; Mon, 16 Jan 2023 16:21:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pHSF8-0006AQ-Ms for pgsql-general@arkaria.postgresql.org; Mon, 16 Jan 2023 16:21:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHSF7-0006AG-Hx for pgsql-general@lists.postgresql.org; Mon, 16 Jan 2023 16:21:54 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHSF3-0001Js-Is for pgsql-general@lists.postgresql.org; Mon, 16 Jan 2023 16:21:53 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C81D95C00D4; Mon, 16 Jan 2023 11:21:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 16 Jan 2023 11:21:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1673886106; x= 1673972506; bh=SoReJc6jC8eCCb+ANDgaJnO79lE+/QEQOEmc/J14Itk=; b=G mZ5EF5qGQcNRHUAHKJS0sLwvy6p0NkWjrtkR1LReCKJntYoufO4hl6XNRXISdsGV RfZ2eanBRF/3CwclJ0it4dMUSxi1EvdMdp06+po6iVunjcC20JyGawW2CSDQBCb8 DlydGqyxypTZ4WyLdr+j2kuXOiX7mMOfHSLdN9EEya/DKA56zhv6CrucBwDKvr5d KgLRY5/EoKDzRHFEizLUnSYwLnE/qKuVHr0enmvDYweBSxv8ZsyPC0i5NPn/TOWL ERnw71bwkBYgBFd7bexsRHG/BvSg/eMGzpi1/CUQHgpzeEbqDy1tvO7zG+WKURCr 0EymlNgnzNmEZtlL7nRiA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1673886106; x=1673972506; bh=S oReJc6jC8eCCb+ANDgaJnO79lE+/QEQOEmc/J14Itk=; b=N1NTPS54DHNK999us 4LDiofodxNxjkP95ilJCEf0sa5cmntBKloFXfUOR74ibStCtx9uqwLemLbBqArsn vijHHSK77Xx/iwi8HznDniV2TX5H1E5NrAIflpvgpo4vK3PfESY4AGPrMoRK9yrf kcmGQHr26gXQQnRJak8FhYQakY25c+gJcIkJbBSuNUpD4ixXu585IISKArioZLkl M0n8hIHrDQMBKb+E+zHR077FuZsHLKzA7iGdG2AkehahWuyiJCtmRA7sYFUET9i/ rBGxplZfPzVwJLskO84iqAXwHFBLW8Z3I9zHh6W5+ol+5bh1dYQk2/8+Rv7eXgpA wdZmA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddtgedgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuhffvfhgjtgfgsehtke ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepleejvdelgf elgeejgeejiefhtdejhfehgeeghedvjeejffefvefhffdtgefhffejnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 16 Jan 2023 11:21:46 -0500 (EST) Message-ID: <7ffc7bbe-9365-e31b-3d6f-2ad388bdc6a5@aklaver.com> Date: Mon, 16 Jan 2023 08:21:45 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: No function matches the given name and argument types. Content-Language: en-US From: Adrian Klaver To: arons , pgsql-general@lists.postgresql.org References: <2418e79e-a2ca-6fa5-205b-8b39dbf9ffec@aklaver.com> In-Reply-To: <2418e79e-a2ca-6fa5-205b-8b39dbf9ffec@aklaver.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/16/23 08:17, Adrian Klaver wrote: > On 1/16/23 08:04, arons wrote: >> Dear All, >> I'm facing a general problem and I'm looking the best, fastest, way >> how to identify the problem and solve it. >> >> As example assume we have a function like that: >> >> CREATE OR REPLACE FUNCTION testBinding01 ( >> >> p_in01 bigint, >> >> p_in02 bigint, >> >> p_in03 bigint, >> >> p_in04 bigint, >> >> p_in05 bigint, >> >> p_in06 bigint, >> >> p_text7 text >> >> ) RETURNS text >> >> LANGUAGE sql >> >> AS $$ >> >> select 'ciao'; >> >> $$; >> >> >> >> I can call the function in some of the variant below: >> >> select testBinding01(1,2,3,4,5,6,7); >> >> select testBinding01(p_in01 => 1,p_in02 => 2,p_in03 => 3,p_in04 => >> 4,p_in05 => 5,p_in06 => 6,p_text7 => 7); >> >> select testBinding01(p_in01 => 1,p_in02 => 2,p_in03 => 3,p_in04 => >> 4,p_in05 => 5,p_in06 => 6,p_text9 => 'some txt'); >> >> >> All of the above, produce the error: >> >> *No function matches the given name and argument types.* > > In psql what does: > > \df test* > > return for the function name. > > I'm going to guess it might be testBinding01, in other words mixed case. > > Have you tried?: > > select "testBinding01"(1,2,3,4,5,6,7); Forget the above. Instead: select testBinding01(1,2,3,4,5,6,7); ERROR: function testbinding01(integer, integer, integer, integer, integer, integer, integer) does not exist LINE 1: select testBinding01(1,2,3,4,5,6,7); select testBinding01(1,2,3,4,5,6,'7'); testbinding01 --------------- ciao The complete error shows what the function is receiving, all integers when it needs a text parameter for the last value. >> * >> * >> * >> * >> * >> * >> My question is: how is the best way  to identify the problem? >> >> Is a parameter name? is a parameter type? is the function name? >> >> An especially in case is a parameter type how is the easy way to >> identify which parameter is causing the problem? >> >> In case a function has a lot of parameters (and in even worst case has >> some overloading) going trough all parameters to check its type/name >> costs a lot of time. >> >> >> Thanks for any help >> >> Renzo >> >> >> > -- Adrian Klaver adrian.klaver@aklaver.com