Re: Rename 'lpp' to 'lp' in heapam.c

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Rename 'lpp' to 'lp' in heapam.c
Дата
Msg-id CAApHDvr9gcDv+qN14ByRz1pVw949aeO3Fs-xJC8fzG_uK3QnLw@mail.gmail.com
обсуждение исходный текст
Ответ на Rename 'lpp' to 'lp' in heapam.c  (Yaphters W <yaphters@gmail.com>)
Ответы Re: Rename 'lpp' to 'lp' in heapam.c  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Wed, 3 May 2023 at 12:16, Yaphters W <yaphters@gmail.com> wrote:
> I just found the naming of the ItemId variables is not consistent in heapam.c. There are 13 'lpp's and 112 'lp's.
Technically'lpp' is correct as ItemId is a line pointer's pointer and there used to be code like "++lpp" for line
pointerarray iteration. Now that all the "++lpp" code has been removed and there are 100+ more occurrences of 'Ip' than
'lpp',I suggest we change 'lpp' to 'lp' to make things consistent and avoid confusion. 

I don't really agree that one is any more correct than the other. I
also don't think we should be making changes like this as doing this
may give some false impression that we have some standard to follow
here that a local variable of a given type must be given a certain
name. To comply with such a standard seems like it would take close to
an endless number of patches which would just result in wasted
reviewer and committer time and give us nothing but pain while back
patching.

-1 from me.

David



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

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound