Re: [Proposal] Level4 Warnings show many shadow vars

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, ranier_gyn(at)hotmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Proposal] Level4 Warnings show many shadow vars
Date: 2019-12-09 22:11:10
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> We have a not-consistently-used convention that names in CamelCase are
> used for global variables. Naming a function parameter in that style
> seems pointlessly confusing. I would rather use redorecptr as Tom
> suggested, which fits with the style used for the other arguments of
> that function. BTW prepending an X or a p looks like minimum effort...
> I'd stay away from that.

Actually, for the particular case of RemoveXlogFile(s), I wonder if it
shouldn't be "startptr" to go with the other argument "endptr". This line
of thinking might not lead to nicer names in other functions, of course.
But we shouldn't assume that a one-size-fits-all solution is going to
improve legibility, and in the end, legibility is what this should be

regards, tom lane

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2019-12-09 22:14:06 Re: verbose cost estimate
Previous Message Jens-Wolfhard Schicke-Uffmann 2019-12-09 22:10:36 Contention on LWLock buffer_content, due to SHARED lock(?)