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 1p1DRG-0000yN-6p for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Dec 2022 21:19:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p1DRF-0000y6-59 for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Dec 2022 21:19:17 +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 1p1DRE-0000xw-S4 for pgsql-hackers@lists.postgresql.org; Fri, 02 Dec 2022 21:19:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p1DRC-0003W0-NH for pgsql-hackers@lists.postgresql.org; Fri, 02 Dec 2022 21:19:15 +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 2B2LJBoa2134308; Fri, 2 Dec 2022 16:19:11 -0500 From: Tom Lane To: Robert Haas cc: Corey Huinker , Andrew Dunstan , Nikita Glukhov , PostgreSQL Hackers Subject: Re: Error-safe user functions In-reply-to: References: <3bbbb0df-7382-bf87-9737-340ba096e034@postgrespro.ru> <3190059.1665164276@sss.pgh.pa.us> <57b7cc2e-1215-3f43-84e4-6d9f8ad575df@dunslane.net> <3049337.1669008405@sss.pgh.pa.us> <469338a3-da38-160f-23b9-813c261bc1d6@dunslane.net> <1677334.1669918475@sss.pgh.pa.us> <1695760.1669923671@sss.pgh.pa.us> <1703871.1669927782@sss.pgh.pa.us> <1721519.1669934025@sss.pgh.pa.us> <1925585.1669990324@sss.pgh.pa.us> <02cf2f81-a776-37ff-291c-100480722a5c@dunslane.net> <2006267.1670006761@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Fri, 02 Dec 2022 15:49:09 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2134306.1670015951.1@sss.pgh.pa.us> Date: Fri, 02 Dec 2022 16:19:11 -0500 Message-ID: <2134307.1670015951@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Fri, Dec 2, 2022 at 1:46 PM Tom Lane wrote: >> The main objection I can see to this approach is that we only support >> one context value per call, so you could not easily combine this >> functionality with existing use-cases for the context field. > I kind of wonder why we don't just add another member to FmgrInfo. > It's 48 bytes right now and this would increase the size to 56 bytes, This'd be FunctionCallInfoData not FmgrInfo. I'm not terribly concerned about the size of FunctionCallInfoData, but I am concerned about the number of cycles spent to initialize it, because we do that pretty durn often. So I don't really want to add fields to it without compelling use-cases, and I don't see one here. regards, tom lane