Re: [COMMITTERS] pgsql: Document struct/union problem with pgindent.

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Document struct/union problem with pgindent.
Date: 2009-06-11 23:22:37
Message-ID: 200906112322.n5BNMbb28522@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > Bruce Momjian wrote:
> > + # Structure/union pointers in function prototypes and definitions have an extra
> > + # space after the asterisk:
> > + #
> > + # void x(struct xxc * a);
>
> > I know we should not be driven by our tools, but is there a case for a
> > coding standard that requires use of a typedef name here?
>
> I don't think so. Shall we artificially create a typedef for standard
> objects like "struct stat" in order to follow such a coding rule? I
> think that's just a recipe for confusion.
>
> In any case, a big fraction of the places that have this issue are code
> that we've imported from elsewhere (the regex engine, zic) and changing
> to typedefs would mean even more drift from upstream and hence
> difficulty in following their patches.
>
> It's just a bug in pgindent that we should try to fix sometime.

I would hope switching to GNU indent would fix this, but might bring new
bugs.

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

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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message User Bmomjian 2009-06-11 23:37:10 pg-migrator - pg_migrator: Update code for new
Previous Message Andrew Dunstan 2009-06-11 23:01:13 Re: [COMMITTERS] pgsql: Document struct/union problem with pgindent.

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-06-11 23:39:47 Re: AlterTableCreateToastTable API still not right for pg_migrator
Previous Message Andrew Dunstan 2009-06-11 23:01:13 Re: [COMMITTERS] pgsql: Document struct/union problem with pgindent.