Re: A small rant about coding style for backend functions

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: A small rant about coding style for backend functions
Date: 2007-11-07 13:35:31
Message-ID: 200711071335.lA7DZVV22051@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Brendan Jurd wrote:
> On 11/6/07, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> >
> > I understand your suggestions but it seems there would be too many
> > individual items to be readable. Can you suggest a full list so we can
> > get an idea of how long it would be?
>
> If the body of material on writing good Postgres code becomes so
> comprehensive that it doesn't all fit on one page:
>
> a) I would see that as a positive!
> b) We can of course split it up into sub-articles.
>
> I can't realistically suggest a "full list" since I am not an
> experienced Postgres hacker. But I would hope for, as a minimum:
>
> * the stuff about good GETARG style,
> * something about using ereport() effectively, and writing
> localization-friendly messages,
> * some actual coding style guidelines.

The problem is that a full list would be harder to understand than just
looking at the existing code and following it, or taking suggestions
from us as we review the patch.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Guillaume Smet 2007-11-07 13:38:04 Re: Estimation problem with a LIKE clause containing a /
Previous Message Alexander Staubo 2007-11-07 13:25:40 Re: Estimation problem with a LIKE clause containing a /