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.98.2) (envelope-from ) id 1xL0Ul-00000001FUz-00L2 for pgsql-general@arkaria.postgresql.org; Sun, 25 Oct 2026 15:50:51 +0000 Received: from localhost ([127.0.0.1]:57042 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xL0Tl-00000000Faq-0ok7 for pgsql-general@arkaria.postgresql.org; Sun, 25 Oct 2026 15:49:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:59164) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xL0Tk-00000000FaS-3179 for pgsql-general@lists.postgresql.org; Sun, 25 Oct 2026 15:49:48 +0000 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xL0Ti-00000000sU3-2EtY for pgsql-general@lists.postgresql.org; Sun, 25 Oct 2026 15:49:47 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 976967A00C6 for ; Sun, 25 Oct 2026 11:49:45 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Sun, 25 Oct 2026 11:49:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1792943385; x=1793029785; bh=i5auQpMBzqL/tccnw+ymH1XRaTu6Ac1cGWY9fX6R12w=; b= ZXh2NtR8+dQ/5B/K5zAcD4rdnbLQpBPt3ihMdQfdvnEGhXc5GkzVesWf1NPd6t9r sD3qp4Ks1hatLZq32W71aUpP0d4Jc0W2ae7Uth55aq4GSou7ujq/E6qd4q18MdQG R9mejs8Pm67sd+SQAHGVuAJuWDGwkSIJtSXeEY6kNgAVx9CqqQaVubAN9AZoXGoT I79tnxYb1Sj9sAH04JVToxwIaTGpXw5OE1Do7RbIG8yecpPmsgFWNtnCuKLQE25N fnsroPWC0FiDbC+r+Fl4OxkRzjfCXwL0ir/k2+oz4g3a6IK90eW+TRXl9SAQ8YUX gMJuFCRHYksdxd3cs/WgGQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1792943385; x= 1793029785; bh=i5auQpMBzqL/tccnw+ymH1XRaTu6Ac1cGWY9fX6R12w=; b=G zpXH+qFi4mC6/jD8Blk+c/fHkytXQVyIvgu/qcyzKHN1VAy+xP5+e7EpAQp0IRT3 wQODHZ9UxY8KziudkaHEsdkTpVN9+rRtsuh1vos78GsILlXhY+UlK1R2+qL2gpc5 xPLXSs5pEj9s9CMdDfLBXqDVaM0Kw1Re9BPokfRxVStadL5JSVjy4RkDrw2hlrmV BRsYmLSoOh6XUai7JAdut9d8lthXwARVmGat2VexiDqVMkDINeJEuWSAlFVsQMKm JZYbbnnc0ffTslOvt+jMkXfYqSqtxi64pCqPSbJyCSz7AqUJ78EVs0uNL5EK0LAb w0UuEwS3XhZe5YbG5mldg== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-07; repo=github.com/dkim2wg/interop; date=2026-10-18; sw=lmtpprox; action=sign d=aklaver.com a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1792943385; d=aklaver.com; mf=PGFkcmlhbi5rbGF2ZXJAYWtsYXZlci5jb20+; rt=PHBnc3FsLWdlbmVyYWxAbGlzdHMucG9zdGdyZXNxbC5vcmc+; s=fm1:rsa-sha256:gYfuNfM0RsV8pcZVBdUDI/6ehUjzO1xfHNHNn6yh1OwmpvD hPG31AH2YSC8YLIBoOMgo0b+JBdCIQxuUDubHJR3VH7mbtII1zHjp1QheLqUiW8N L3mXBzS14uDdGwtG1KGHYLOnYTyiYfUx8D9jVETEp7yUJaIpgkLZ27XPF0X3vYIL dFpGA3wJQkoUSB9OS8sBfBWZzMqZZzjk1mRNe0m8d6sI86wH+P/EA0NgYAVXdH36 CPYwrre8VY/iRBEhJaLw/kfemSFLLoGqzegV1rR7mVBEpgww/GrLW4AS2Kec0Vfk eYRB+b1azAx/APvbuEOHCW8JdZBKMvAtHIxjoAA==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-07; repo=github.com/dkim2wg/interop; date=2026-10-18; sw=lmtpprox; action=mi-m=1; hc=14; hn=cc,content-language,content-transfer-encoding,content-type, date,feedback-id,from,in-reply-to,message-id,mime-version, references,subject,to,user-agent; Message-Instance: m=1; h=sha256:8ekL5h06TOwJ2DsXFAvLNECegN0LDGEopt2Rlw2t8zI=:AYHfBFhJIK/+Xn6vvU06qZ3HldnpNdRacVF+REwiMZE=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFMq8M3uOjscWtvP1NDG6jGi9NJttoCGgvrtcF2LLcDmCeROq9gSkdKAsjy1FHdDg 6/26mrgVKq3TrjX6npvpX0DqFWhFSsw3ovYafuRKkQOFXpUgvHSZ3r+aWmHNtJwfbePE1x Q6wBEbTdPd/PijeP5fwtJkutXXVEsHFDYBQPBwSswMyC0DOvXIMagZoqFFjQBECHbMsc4e sUwyqan3d/MYArKrconXP21d96HC/GTXpMzKhqjK4F/L5FWdTRfTlNGMmmnQCZcqtGrxr0 yEwKlBZP9qc8UOMLNrbo2eUukR1gpJLFd+QIGWIXsqb8A/62EucBHSrHeC5TBH/lSzFFSj gxKlwsIOUP2WpdDLlVCQBhQRFZnscKnLNevK4NhS61XmOA46Sj3au+zPAiC6U4uC0gIEma qN6olCQ7fsiBNwuIUlnwX2MbR86diOg8XQruwR1ZmZGLl1cmWnDBW+pQnL0IGB9/wkesKg 6WS7BrwRyleGReWNLahfsk9H5EDrg1+LDkVEdFBD5MOZhGUiNtcA7q8KErnsuVKjV5MW65 /0pVxh90Nj0c8ABLdQAsegr7bU0Q0msH27s2fZCtJJkNFO/1dofFVx0N6XyNVZkYndk5YI uZADmJO2vLnJGMHsGciDQWso5qV/AJeYL5xXnqlZ5UuMBBS9xNqwOeWUu0gw X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 25 Oct 2026 11:49:44 -0400 (EDT) Message-ID: <75654f90-b8a6-42f7-b71a-2591c4e9bc0d@aklaver.com> Date: Sun, 25 Oct 2026 08:49:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Debugging --- ERROR: function does not exist To: Mark Cc: Tom Lane , pgsql-general@lists.postgresql.org References: <322082.1792933209@sss.pgh.pa.us> Content-Language: en-US From: Adrian Klaver In-Reply-To: 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 10/25/26 8:34 AM, Mark wrote: > > On Sun, Oct 25, 2026 at 3:17 PM Adrian Klaver > wrote: > > On 10/25/26 7:55 AM, Mark wrote: > > Hi Adrian > > > > Thanks for the input > > > > On Sun, Oct 25, 2026 at 2:42 PM Adrian Klaver > > > >> wrote: > > > > >     And from here: > > > > https://www.postgresql.org/docs/current/plpgsql- www.postgresql.org/docs/current/plpgsql-> > >     declarations.html#PLPGSQL-DECLARATION-PARAMETERS > www.postgresql.org/docs/current/plpgsql- > declarations.html#PLPGSQL- plpgsql-declarations.html#PLPGSQL-> > >     DECLARATION-PARAMETERS> > > > >     "To call a function with OUT parameters, omit the output > >     parameter(s) in > >     the function call: ..." > > > > > > In the second case with 3 parameters:  SELECT getSessDbKey > (iSessionId > > => '1234'::text, iUser => .... > > This was called from the psql command line, the OUT values were > returned > > in the terminal, example: > > getsessdbkey > > --------------- > > (3,,keyFound) > > Which is the correct process. > > When you are calling(SELECTing) the function inside the other function > you are doing: > > SELECT getSessDbKey (jSessionId, jUser, 'functionName'::text, > vSessDbKey, vSessRet, vGetSessDbKeyMess); > > There six arguments to to the function. > > You get this: > > ERROR:  function getsessdbkey(text, text, text, bigint, customType, > text) does not exist > > because your functions signature is: > > getsessdbkey(text, text, text) > > The OUT parameters are not exposed, so you only get to use three > arguments to the function. > > If you want a parameter to be dual purpose then you can declare it > INOUT. > > When calling the function (and when I get the error) this is from > another function using the syntax: > SELECT getSessDbKey (jSessionId, jUser, 'functionName'::text, > vSessDbKey, vSessRet, vGetSessDbKeyMess); > > The function signature according to \df getSessDbKey is: > Schema |     Name     | Result data type | >                   Argument data types >               | Type > --------+--------------+------------------ > +---------------------------------------------------------------------------------------------------------------------+------ >  public | getsessdbkey Argument data types| record           | isessionid text, iuser > text, ifunction text, OUT osessdbkey bigint, OUT osessret retmessage, > OUT retsessdbmess text | func > > with 6 parameters, which is why the call has 6 parameters. If you are > aware of a way to find the function signature, do please let me know? The easiest way is to ignore everything in the column 'Argument data types' that is declared OUT, what is left is the signature. > > For the command line call only 3 parameters were provided and the > terminal listed the OUT 3 parameters I showed in my previous response Which as I stated before is entirely correct. > > I do not have / need / have built around INOUT parameters Then when you SELECT the getsessdbkey in the other function do exactly as you did in the psql case, use only (isessionid text, iuser text, ifunction text). OUT is a shortcut to doing a RETURN of the variable, it does not figure into the input of arguments to the function body. > > > > > > > Thanks for the link, for the 1st case I had defined the IN and OUT > > parameters in the parent function, I have also just tried the: > > parameterName ALIAS FOR $x , but that did not make a difference > > > > Mark > > > > Edit I have just seen your follow up message, there are no INOUT > parameters > > > >      > > >      > I just tried to user CALL and the HINT was to use SELECT > >      > > >      > Mark > >      > > >      > On Sun, Oct 25, 2026 at 1:00 PM Tom Lane > > >     > > >      > > >>> wrote: > >      > > >      >     Mark > > >      > >>> writes: > >      >      > I am getting the following error which has been > driving me > >     crazy: > >      >      > ERROR:  function getsessdbkey(text, text, text, bigint, > >      >     customType, text) > >      >      > does not exist > >      > > >      >     (1) search_path problem, perhaps? > >      >     (2) are you using a CALL statement to call it? > >      > > >      >                              regards, tom lane > >      > > > > > > >     -- > >     Adrian Klaver > > adrian.klaver@aklaver.com > > > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com