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 1mFfVc-0002v9-Mx for pgsql-general@arkaria.postgresql.org; Mon, 16 Aug 2021 16:30:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mFfVb-00052i-1O for pgsql-general@arkaria.postgresql.org; Mon, 16 Aug 2021 16:30:43 +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 1mFfVa-00052a-Oi for pgsql-general@lists.postgresql.org; Mon, 16 Aug 2021 16:30:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFfVX-0001IB-VY for pgsql-general@lists.postgresql.org; Mon, 16 Aug 2021 16:30:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 17GGUa4x896511; Mon, 16 Aug 2021 12:30:36 -0400 From: Tom Lane To: Luca Ferrari cc: pgsql-general Subject: Re: help with fmgr In-reply-to: References: Comments: In-reply-to Luca Ferrari message dated "Mon, 16 Aug 2021 18:19:50 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <896509.1629131436.1@sss.pgh.pa.us> Date: Mon, 16 Aug 2021 12:30:36 -0400 Message-ID: <896510.1629131436@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Luca Ferrari writes: > I've two main doubts: > - is fmgr working for non PL functions? Because I cannot see messages > starting when an internal function is invoked; Built-in functions do not support fmgr_hook; see the order of tests in fmgr_info_cxt_security(). I'd be loath to change that, for both performance and risk-of-circularity reasons. Note that built-in is not the same as internal --- you could potentially make a new internal-language pg_proc entry pointing at some existing built-in function, and then calls using that could get hooked. regards, tom lane