Thread: Coding standards? Recommendations?

Coding standards? Recommendations?

From
korry
Date:
I've noticed a variety of coding styles in the PostgreSQL source code.  In 
particular, I see a mix of naming conventions.  Some variables use camelCase 
(or CamelCase), others use under_score_style.

I'm just wondering if there's a preferred naming convention.  Is there an 
official convention?  An unofficial recommendation?  Or even a majority 
preference?

I'm not necessarily arguing for an official standard, but I'd be happy to 
follow a standard/recommendation if there is one.  I find it just as easy to 
write conforming code as non-conforming code.

(sorry if this has been covered before - if you can point me to a document 
that covers the information I'm looking for, that would be very helpful).
        -- Korry



Re: Coding standards? Recommendations?

From
James William Pye
Date:
On Sun, 2006-01-15 at 11:14 -0500, korry wrote:
> (sorry if this has been covered before - if you can point me to a document 
> that covers the information I'm looking for, that would be very helpful).

I asked this question about a half year ago or so, and got:
   http://archives.postgresql.org/pgsql-hackers/2005-05/msg00331.php

Hope it helps.
-- 
Regards, James William Pye


Re: Coding standards? Recommendations?

From
korry
Date:
> I asked this question about a half year ago or so, and got:
>
>     http://archives.postgresql.org/pgsql-hackers/2005-05/msg00331.php

Thanks James, that's just what I was looking for.
        -- Korry


Re: Coding standards? Recommendations?

From
Simon Riggs
Date:
On Sun, 2006-01-15 at 11:14 -0500, korry wrote:
> I've noticed a variety of coding styles in the PostgreSQL source code.  In 
> particular, I see a mix of naming conventions.  Some variables use camelCase 
> (or CamelCase), others use under_score_style.

I just follow the style of the module I'm working in.

Best Regards, Simon Riggs