Re: Postgresql coding conventions

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Postgresql coding conventions
Дата
Msg-id 48C8EE0A.4080207@enterprisedb.com
обсуждение исходный текст
Ответ на Postgresql coding conventions  (Abbas <abbas.butt@enterprisedb.com>)
Список pgsql-hackers
Abbas wrote:
> 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?

Both styles are in use in different parts of the source tree, mainly for 
historical reasons. The rule of thumb is to see what style is used in 
the surrounding code, and follow that.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Transaction Snapshots and Hot Standby
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Transaction Snapshots and Hot Standby