Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWoqf-0005QN-LH for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jan 2018 19:37:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWoqd-0004Rn-MM for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jan 2018 19:37:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eWoqd-0004Rd-Ck for pgsql-hackers@lists.postgresql.org; Wed, 03 Jan 2018 19:37:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eWoqW-0002YV-V6 for pgsql-hackers@lists.postgresql.org; Wed, 03 Jan 2018 19:37:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w03Jb24w022955; Wed, 3 Jan 2018 14:37:02 -0500 From: Tom Lane To: Alvaro Herrera cc: Robert Haas , Darafei =?utf-8?Q?Kom=D1=8Fpa?= Praliaskouski , PostgreSQL Hackers Subject: Re: Better testing coverage and unified coding for plpgsql loops In-reply-to: <20180103193144.ccc4bwcymxlznqol@alvherre.pgsql> References: <20180103193144.ccc4bwcymxlznqol@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 03 Jan 2018 16:31:44 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22953.1515008222.1@sss.pgh.pa.us> Date: Wed, 03 Jan 2018 14:37:02 -0500 Message-ID: <22954.1515008222@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > Tom Lane wrote: >> I really think we should stick with the macro implementation, unless >> somebody wants to do some actual investigation to prove that a >> function implementation imposes negligible cost. > I don't really care too much about the macro-or-function side of this, > but if you wanted to improve debuggability avoiding the performance cost > of a function call, you could use a static inline function, which is > supposed (AFAIK) to have performance characteristics equivalent to those > of a macro. I'm not sure whether inlining the function can be relied on to get rid of the side effects of taking rc's address. It wouldn't take all that much work to establish the point, probably, but it's work I don't care to put into it. regards, tom lane