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 1p2Eyi-0008Ki-IP for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Dec 2022 17:10:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p2Eyh-0002pM-6Z for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Dec 2022 17:10:03 +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 1p2Eyg-0002o9-PP for pgsql-hackers@lists.postgresql.org; Mon, 05 Dec 2022 17:10:02 +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 1p2Eye-0003k7-5V for pgsql-hackers@lists.postgresql.org; Mon, 05 Dec 2022 17:10:01 +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 2B5H9v5g3311163; Mon, 5 Dec 2022 12:09:57 -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> <2503569.1670104001@sss.pgh.pa.us> <330! 4244.1670256567@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Mon, 05 Dec 2022 11:20:02 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3311161.1670260197.1@sss.pgh.pa.us> Date: Mon, 05 Dec 2022 12:09:57 -0500 Message-ID: <3311162.1670260197@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Mon, Dec 5, 2022 at 11:09 AM Tom Lane wrote: >> efeedback? But TBH I do not think any of these are better than ereturn. > I do. Having a macro name that is "return" plus one character is going > to make people think that it returns. But it does return, or at least you need to code on the assumption that it will. (The cases where it doesn't aren't much different from any situation where a called subroutine unexpectedly throws an error. Callers typically don't have to consider that.) regards, tom lane