Re: Remove trailing comma from enums

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Remove trailing comma from enums
Дата
Msg-id 999902.1641432235@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Remove trailing comma from enums  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: Remove trailing comma from enums  (Peter Smith <smithpb2250@gmail.com>)
Список pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> On Thu, Jan 6, 2022 at 12:56 PM Peter Smith <smithpb2250@gmail.com> wrote:
>> These are quite rare in the PG src, so I doubt they are intentional.
>> PSA a patch to remove the trailing commas for all that I found.

> -1.  I don't see the problem with C99 trailing commas.  They avoid
> noisy diff lines when patches add/remove items.

I think they're rare because up till very recently we catered to
pre-C99 compilers that wouldn't accept them.  There's not much
point in insisting on that now, though.

Personally I'm less excited than Thomas about trailing commas
being good for reducing diff noise, mainly because I think
that "add new entries at the end" is an anti-pattern, and
if you put new items where they logically belong then the
problem is much rarer.  But I'm not going to argue against
committers who want to do it like that, either.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Proposal: remove obsolete hot-standby testing infrastructure
Следующее
От: Takashi Menjo
Дата:
Сообщение: Re: Map WAL segment files on PMEM as WAL buffers