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 1kAkD1-0005mg-Rw for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Aug 2020 01:26: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 1kAkCz-0000pZ-CM for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Aug 2020 01:26: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 1kAkCy-0000pS-CN for pgsql-hackers@lists.postgresql.org; Wed, 26 Aug 2020 01:26:36 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAkCq-0002pR-Hi for pgsql-hackers@postgresql.org; Wed, 26 Aug 2020 01:26:34 +0000 Received: from hnk.local (p12054-ipngn2901funabasi.chiba.ocn.ne.jp [153.212.171.54]) by oss.nttdata.com (Postfix) with ESMTPSA id 0834762334; Wed, 26 Aug 2020 10:26:24 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: some unused parameters cleanup To: Andreas Karlsson , Bruce Momjian , Tom Lane Cc: Peter Eisentraut , pgsql-hackers References: <511bb100-f829-ba21-2f10-9f952ec06ead@2ndquadrant.com> <2747707.1598374771@sss.pgh.pa.us> <20200825174229.GB20679@momjian.us> <9612131a-b666-ce3b-e0ac-74f304cf3228@proxel.se> From: Fujii Masao Message-ID: Date: Wed, 26 Aug 2020 10:26:23 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <9612131a-b666-ce3b-e0ac-74f304cf3228@proxel.se> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020/08/26 2:50, Andreas Karlsson wrote: > On 8/25/20 7:42 PM, Bruce Momjian wrote: >> On Tue, Aug 25, 2020 at 12:59:31PM -0400, Tom Lane wrote: >>> Peter Eisentraut writes: >>>> Here is a series of patches to remove some unused function parameters. >>>> In each case, the need for them was removed by some other code changes >>>> over time but the unusedness was not noticed.  I have included a >>>> reference to when they became unused in each case. >>> >>> For some of these, there's an argument for keeping the unused parameter >>> for consistency with sibling functions that do use it.  Not sure how >>> important that is, though. >> >> I think if they are kept for that reason, we should document that so we >> know not to revisit this issue for them.> > +1 > > That way we can avoid new people discovering the same unused parameters and then submitting patches for them. I agree that some parameters were kept for that reason, but ISTM that also some were kept just accidentally. For example, regarding unused parameter "encoding" that 0010 patch tries to remove, commit f0d6f20278 got rid of the use of "encoding" from generate_normalized_query() but ISTM that it just forgot to remove that parameter. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION