Re: Nitpick/question: Use of aliases for global variables in functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Nitpick/question: Use of aliases for global variables in functions
Дата
Msg-id 1823922.1629429900@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Nitpick/question: Use of aliases for global variables in functions  (Corey Huinker <corey.huinker@gmail.com>)
Список pgsql-hackers
Corey Huinker <corey.huinker@gmail.com> writes:
> In src/backend/access/transam/xact.c, I'm noticing a code style
> inconsistency.
> [ to wit, local variable alias for CurrentTransactionState or not ]
> Is this something worth standardizing, and if so, which style do we like
> better?

I can't get excited about changing this.  There may be historical
reasons for the differences, eg maybe at one time there was more
than one reference to the struct in IsTransactionState().  Or maybe
it was just different people doing it a bit differently.  It's not
really a big enough difference to be a hindrance to readers, IMO
anyway, so I'd leave it alone.

            regards, tom lane



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

Предыдущее
От: Corey Huinker
Дата:
Сообщение: Nitpick/question: Use of aliases for global variables in functions
Следующее
От: Paul Guo
Дата:
Сообщение: Re: Two patches to speed up pg_rewind.