Re: some unused parameters cleanup

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Andreas Karlsson <andreas(at)proxel(dot)se>, Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: some unused parameters cleanup
Date: 2020-08-26 01:26:23
Message-ID: abb6f591-8666-a7d1-c754-d4dfdffe859a@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 <peter(dot)eisentraut(at)2ndquadrant(dot)com> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Sharma 2020-08-26 01:48:49 Re: recovering from "found xmin ... from before relfrozenxid ..."
Previous Message Ranier Vilela 2020-08-26 00:22:36 Re: [PATCH] Fix Uninitialized scalar variable (UNINIT) (src/backend/access/heap/heapam_handler.c)