Re: Naming convention - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Naming convention
Date
Msg-id 15839.1033961640@sss.pgh.pa.us
Whole thread Raw
In response to Naming convention  (Alvaro Herrera <alvherre@atentus.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@atentus.com> writes:
> What's the naming convention for new functions/variables?  I've seen
> this_way() and ThisWay() used without visible distinction.  I've used
> both in previously submitted and accepted patches...
> Does it matter?

Consistency?  We don't need no steenking consistency ;-)

Seriously, you can find a wide range of naming conventions in the PG
sources.  It might be better if the range weren't so wide, but I doubt
anyone really wants to engage in wholesale renaming (let alone getting
into the flamewars that would ensue if we tried to pick a One True
Naming Style).

I'd suggest conforming to the namestyle that you see in code closely
related to what you are doing, or at least some namestyle you can find
precedent for somewhere in the backend.  Beyond that, no one will
question you.

My own two cents: pay more attention to the semantic content of your
names, and not so much to how you capitalize 'em.  FooBar() is a useless
name no matter how beautifully you present it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: cross-posts (was Re: [GENERAL] Large databases, performance)
Next
From: Alvaro Herrera
Date:
Subject: pg_filedump