Re: Postgresql coding conventions

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: abbas(dot)butt(at)enterprisedb(dot)com
Cc: "pgsql-hackers\(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgresql coding conventions
Date: 2008-09-11 11:12:01
Message-ID: 87d4jbx7ge.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Abbas <abbas(dot)butt(at)enterprisedb(dot)com> writes:

> While writing code or reviewing a path are we supposed to consider the
> camel cased names correct or the under-score separated names correct?

Some parts of the code use the two to distinguish between functions local to
that module and functions that are part of the public api. In those cases
functions with capitals are part of the public api of the module and lower
case functions are internal functions or utility functions. Except for the
modules where it's the reverse...

And actually looking around I can't find any good examples of this where there
aren't exceptions. I don't like the idea of a massive cleanup patch for this
but if someone's doing major surgery on a module it could be worth fixing up
names in that module to be consistent at the same time.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's PostGIS support!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-09-11 11:14:56 Re: Interesting glitch in autovacuum
Previous Message Magnus Hagander 2008-09-11 10:58:52 Re: [Review] pgbench duration option