RE: [Proposal] Level4 Warnings show many shadow vars

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема RE: [Proposal] Level4 Warnings show many shadow vars
Дата
Msg-id MN2PR18MB29275E095429DD1451E969CFE35B0@MN2PR18MB2927.namprd18.prod.outlook.com
обсуждение исходный текст
Ответ на Re: [Proposal] Level4 Warnings show many shadow vars  (John W Higgins <wishdev@gmail.com>)
Ответы Re: [Proposal] Level4 Warnings show many shadow vars  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
De: John W Higgins <wishdev@gmail.com>
Enviado: terça-feira, 10 de dezembro de 2019 15:58

>For someone that expounds consistency - this patch is the furthest thing from it.
>In some places names are randomly changed to have an underscore >(authmethodlocal to authmethod_local with the obvious
inconsistencyas well) - >in some places names are changed to remove underscores (stop_t to stopt). >Some places random
lettersare added (checkPoint to xcheckPoint) some places >perfectly good names are truncated (conf_file to file). 
The first purpose of the patch was to remove collisions from shadow global variable names.
The second was not to change the semantics of variable names, hence the use of x or putting or remove underscore.
But I agree with you that the choice of names can improve.
xcheckpoint sounds ugly.
stopt sounds ugly too.

>Random places remove perfectly good prefixes and replace with single letters >(numTables to nTables)
numTables already a global variable name.
nTables It seems very reasonable to me to contain the number of tables.

>Random places switch from lower case names to upper case names (sentPtr to >WalSentPtr) most places leave lower case
names(days to ndays). 
again senPtr already a global variable name.
Well, I tried to follow the local source style a little, since the project does not have a default for global names.
There we have some WalSntCtl por example.

ndays sounds very good to me for number of days.

>Please at least be consistent within the patch itself.....
I'm trying.

regards,
Ranier Vilela


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Contention on LWLock buffer_content, due to SHARED lock(?)
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [Proposal] Level4 Warnings show many shadow vars