Sorting case branches in outfuncs.c/outNode alphabetically

Поиск
Список
Период
Сортировка
От Fedir Panasenko
Тема Sorting case branches in outfuncs.c/outNode alphabetically
Дата
Msg-id CAGPGFPSsUFgn-EyA3NZba4WHppPyfR6WTcJWnyL4jSm9j4RnWQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Sorting case branches in outfuncs.c/outNode alphabetically  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi all,

outfuncs.c contains a switch statement responsible for choosing
serialization function per node type here:
https://github.com/postgres/postgres/blob/master/src/backend/nodes/outfuncs.c#L3711
It spans over >650LOC and is quite unreadable, requiring using search
or code analysis tools for pretty much anything.

I'd like to sort these case branches alphabetically and I'd like to
get some input on that prior to submitting a patch. Obvious benefit
would be increase in readability, with the downside of somewhat
messing up the git history.

(readfuncs.c contains a similar construct for deserializing nodes, but
that one is if...else based as opposed to switch, so order there might
have performance implications -> I'd reserve that topic for separate
discussion).

---
Best regards,
Fedir



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: SELECT INTO deprecation
Следующее
От: Alastair Turner
Дата:
Сообщение: Re: Proposed patch for key managment