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 1nPQ5n-0005GC-0y for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Mar 2022 14:36:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nPQ5l-0003rS-Nu for pgsql-hackers@arkaria.postgresql.org; Wed, 02 Mar 2022 14:36:37 +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 1nPQ51-0003nB-38 for pgsql-hackers@lists.postgresql.org; Wed, 02 Mar 2022 14:35:51 +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 1nPQ4w-0000ad-Cq for pgsql-hackers@lists.postgresql.org; Wed, 02 Mar 2022 14:35:47 +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 222EZi0J2976203; Wed, 2 Mar 2022 09:35:44 -0500 From: Tom Lane To: Robert Haas cc: Aleksander Alekseev , Michael Paquier , Kyotaro Horiguchi , PostgreSQL Hackers Subject: Re: pg_stop_backup() v2 incorrectly marked as proretset In-reply-to: References: <20220302.172235.1181597714315490061.horikyota.ntt@gmail.com> Comments: In-reply-to Robert Haas message dated "Wed, 02 Mar 2022 09:31:49 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2976201.1646231744.1@sss.pgh.pa.us> Date: Wed, 02 Mar 2022 09:35:44 -0500 Message-ID: <2976202.1646231744@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Wed, Mar 2, 2022 at 5:25 AM Aleksander Alekseev > wrote: >> Declaring a macro inside the procedure body is a bit unconventional. >> Since it doesn't seem to be used for anything except these two array >> declarations I suggest keeping simply "3" here. > I think we do this kind of thing in various places in similar > situations, and I think it is good style. It makes it easier to catch > everything if you ever need to update the code. Yeah, there's plenty of precedent for that coding if you look around. I've not read the whole patch, but this snippet seems fine to me if there's also an #undef at the end of the function. regards, tom lane