Coding standards? Recommendations?

Started by korryalmost 20 years ago4 messages
#1korry
korry@appx.com

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

#2James William Pye
pgsql@jwp.name
In reply to: korry (#1)
Re: Coding standards? Recommendations?

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

#3korry
korry@appx.com
In reply to: James William Pye (#2)
Re: Coding standards? Recommendations?

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

#4Simon Riggs
simon@2ndquadrant.com
In reply to: korry (#1)
Re: Coding standards? Recommendations?

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