Re: Remove redundant assignment in CreateWorkExprContext

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Remove redundant assignment in CreateWorkExprContext
Дата
Msg-id 94916.1768376000@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Remove redundant assignment in CreateWorkExprContext  (Andreas Karlsson <andreas@proxel.se>)
Ответы Re: Remove redundant assignment in CreateWorkExprContext
Список pgsql-hackers
Andreas Karlsson <andreas@proxel.se> writes:
> On 8/21/25 5:47 AM, Chao Li wrote:
>> While discussing [1], I was reading execUtils.c, then I noticed this 
>> redundant local variable assignment in CreateWorkExprContext(). The 
>> attached patch fixed that.

> Nice spotted but I think your patch reduces readability. How about this?

Looking at the git history, CreateWorkExprContext was introduced in
50a38f651, and at that time it did some nontrivial calculations
to adjust that initial value of maxBlockSize.  Later, cc721c459
simplified matters but forgot to remove the now-useless
initialization.  So +1, unless Jeff has some reason to keep it
like this?

            regards, tom lane



В списке pgsql-hackers по дате отправления: