Re: Nitpick/question: Use of aliases for global variables in functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Nitpick/question: Use of aliases for global variables in functions
Date
Msg-id 1823922.1629429900@sss.pgh.pa.us
Whole thread Raw
In response to Nitpick/question: Use of aliases for global variables in functions  (Corey Huinker <corey.huinker@gmail.com>)
List 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 by date:

Previous
From: Corey Huinker
Date:
Subject: Nitpick/question: Use of aliases for global variables in functions
Next
From: Paul Guo
Date:
Subject: Re: Two patches to speed up pg_rewind.