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 1losai-0000NB-HW for pgsql-general@arkaria.postgresql.org; Thu, 03 Jun 2021 19:01:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1losah-0004bF-HF for pgsql-general@arkaria.postgresql.org; Thu, 03 Jun 2021 19:01:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1losah-0004b7-8d for pgsql-general@lists.postgresql.org; Thu, 03 Jun 2021 19:01:15 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1losac-00069Z-Ia for pgsql-general@lists.postgresql.org; Thu, 03 Jun 2021 19:01:14 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1losaa-0001Ob-CO; Thu, 03 Jun 2021 15:01:08 -0400 Date: Thu, 3 Jun 2021 15:01:08 -0400 From: Bruce Momjian To: Marc Millas Cc: "pgsql-general@lists.postgresql.org" Subject: Re: syntax question Message-ID: <20210603190108.GC22019@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jun 3, 2021 at 08:58:03PM +0200, Marc Millas wrote: > Hi, > > within a function, I want to create another function. > no pb. > but if I write: > declare bidule text; > begin > bidule:='myfunc'; > create function bidule() ... > > > it does create a function named bidule and not myfunc. > so I am obviously missing something too obvious. You can't create functions inside of functions; same for procedures. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.