Re: Postgresql coding conventions

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
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 10:12:40
Message-ID: 48C8EF18.8080207@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Abbas wrote:
> Hi,
> I have noticed two different coding conventions being followed in
> postgres code base.
>
> See e.g. function names in syslogger.c
>
> static void set_next_rotation_time(void);
> static void sigHupHandler(SIGNAL_ARGS);
>
> and variable names in the same file
>
> int bytes_in_logbuffer = 0;
> char *currentLogDir;
>
> Chapter 46 of the documentation does not say much about variable or
> function naming.
>
> While writing code or reviewing a path are we supposed to consider the
> camel cased names correct or the under-score separated names correct?
>
>
>

I don't think we have a standard. If there is to be one I'll cast as
many votes as possible for the use of underscores.
readingWithoutSpacesReallySucks.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-09-11 10:20:38 Re: Transaction Snapshots and Hot Standby
Previous Message Heikki Linnakangas 2008-09-11 10:12:11 Re: [Review] pgbench duration option