Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vDGJn-0065mz-J9 for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Oct 2025 06:02:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vDGJm-006UeK-DE for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Oct 2025 06:02:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vDGJm-006UeC-3f for pgsql-hackers@lists.postgresql.org; Mon, 27 Oct 2025 06:02:57 +0000 Received: from mail-m16.yeah.net ([1.95.21.16]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vDGJd-004QVk-2H for pgsql-hackers@lists.postgresql.org; Mon, 27 Oct 2025 06:02:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yeah.net; s=s110527; h=Message-ID:Date:MIME-Version:Subject:To:From: Content-Type; bh=EW7MCmUYqAMM7oCroCGZWBAyRO0kl6h850yrmbUDy1I=; b=f+E4ItPTo1hoIWHHieHkBgVrPf2ERQfksg+ZLOnccKmzGAE/ObN3P3QOJoKDkG rHAIgWKRgx1xj6JbmkHGvzfQLxi9NVeGJ2FdsshMLnYMhY2BIDHo55bBHPfcaHVu 0h+/weMdvB/qWsT5cs2tnLNJXenz3JKhLnE3feth8SrvY= Received: from [192.168.10.60] (unknown []) by gzsmtp3 (Coremail) with SMTP id M88vCgCnH3QBC_9ocfm5AA--.36152S2; Mon, 27 Oct 2025 14:02:42 +0800 (CST) Message-ID: Date: Mon, 27 Oct 2025 14:02:41 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Little refactoring of portalcmds.c To: Aleksander Alekseev , PostgreSQL Hackers References: Content-Language: en-US From: Quan Zongliang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: M88vCgCnH3QBC_9ocfm5AA--.36152S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU7yv3UUUUU X-Originating-IP: [117.10.92.190] X-CM-SenderInfo: htxd06xrqjzxxdqjq5hhdkh0dhw/1tbiIALcAWj-CwJLQQAA3r List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/8/25 10:02 PM, Aleksander Alekseev wrote: > Hi, > > The proposed patch places some repetitive code in a helper function. > The value of this change is arguably not that high but it makes the > code a bit neater IMO. > It also reduces the ease of reading the code. Just add a function for a single if statement. I don't think it's necessary. Regards, Quan Zongliang