Re: A small rant about coding style for backend functions

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Brendan Jurd" <direvus(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Subject: Re: A small rant about coding style for backend functions
Date: 2007-11-08 15:30:26
Message-ID: 87lk9892lp.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Bruce Momjian" <bruce(at)momjian(dot)us> writes:

> Tom Lane wrote:
>
>> Having said that, there are two or three tips worth knowing about
>> pg_indent's behavior, like when and how to use dashes to prevent
>> comment blocks from being re-flowed. But it's a short list.
>
> Agreed, and the developer's FAQ already has this:
>
> <P><I>pgindent</I> will the format code by specifying flags to your

What I would like to see are guidelines on the more important issues. Things
like always using PG_GETARG_* and DatumGet* rather than explicitly calling
pg_detoast_datum() and so on.

Actually I'm not sure what else would fall under "and so on".

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-11-08 15:45:38 Re: Postgresql 8.3 beta crash
Previous Message Guillaume Smet 2007-11-08 15:29:34 Re: Estimation problem with a LIKE clause containing a /