Debugging --- ERROR: function does not exist

From: Mark <nvpostgres(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Debugging --- ERROR: function does not exist
Date: 2026-10-25 11:50:15
Message-ID: CAAm-KOsbEWVBjv6C80g-WgDF-87Wc90_4X+AWvSO=Fw1ps5=6g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi there

I am getting the following error which has been driving me crazy:
ERROR: function getsessdbkey(text, text, text, bigint, customType, text)
does not exist

This function is being called within another function, where I have defined
the "OUT variables" within the DECLARE block
I have also tried reassigning variables so that the "IN variables" (so the
input variables to the child function getsessdbkey" are also within the
DECLARE block [I read something about passing memory locations])

The function does exist and has the top level creation syntax as:
CREATE OR REPLACE FUNCTION getSessDbKey (IN iSessionId text, IN iUser text,
IN iFunction text, OUT oSessDbKey BIGINT, OUT oSessRet customType, OUT
retSessDbMess TEXT )
RETURNS record

If I run \df getsSessDbKey I get:
Schema | Name | Result data type |
Argument data types
| Type
--------+--------------+------------------+--------------------------------------------------------------------------------------------------------------------+------
public | getsessdbkey | record | isessionid text, iuser text,
ifunction text, OUT osessdbkey bigint, OUT osessret customtype, OUT
retsessdbmess text | func

I have have been able to run this getsessdbkey function from the psql
command line using the following syntax:
SELECT getSessDbKey (iSessionId => '1234'::text, iUser => 'cmd test'::text,
iFunction => 'cmd test'::text);

and when calling this function within the parent function I have tried
CASTING all the variables, but I still get the ERROR function does not
exist error message

Any pointers into how I can find out more about this error or hints on how
to resolve this would be heavily appreciated?

Many thanks in advance

Mark

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2026-10-25 13:00:09 Re: Debugging --- ERROR: function does not exist
Previous Message Laurenz Albe 2026-10-25 07:32:51 Re: PostgreSQL 17: protecting role attributes between verification and COMMIT