Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Wieck <wieck(at)debis(dot)com>, PostgreSQL HACKERS <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t
Date: 1999-12-18 20:32:35
Message-ID: 199912182032.PAA06240@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[Charset ISO-8859-1 unsupported, filtering to ASCII...]
> On 1999-12-18, Bruce Momjian mentioned:
>
> > I don't need to run pgindent before _every_ release. No problem.
>
> Is this pgindent thing negotiable at all? IMHO the output of plain indent
> -orig looks much nicer (and readable). It also tends to look like the bsd
> c-style in emacs. If we could just tell people 'set up {emacs|vi|ed} like
> this' (such as c-set-style bsd) there wouldn't be half a dozen different
> formats propagating through the source until someone comes around with
> pgindent.

I did not decide on this format myself, but several developers said they
prefer this format, and I do too. I am willing to open the discussion
to see what people would prefer.

The current format does match my C style for non-PostgreSQL projects
too.

I remember clear mention that we did not like:

if () {

}

I see you are writing your shell scripts with that, and am not a fan of
it, but it is only a shell script.

>
> Btw., I use GNU indent 2.2.1 which is a long way from the versions
> pgindent tries to warn about.

Yes, the message was from when GNU indent had stoppped development in
1994 or so, and they bugs never had been fixed. I have no idea how the
new GNU indent is. I am sure it has fixed some of the older bugs, but I
don't know if they added new bugs.

>
> More important than arguing about code formatting, however: Could we lose
> this a-tab-looks-like-4-spaces thing, now that Bruce has a new editor(?) ?
> In any unprepar{ed|able} viewer (cat/more/less/pico) the code looks like
> hell. Maybe we could lose the tab altogether because it's a pain. Just
> insert 4 (8, 12, ...) spaces.

Again, I think everyone liked it at the time, but this may have changed.

Speak up, folks.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 1999-12-18 21:36:28 Re: [HACKERS] Cc: lamar.owen@wgcr.org
Previous Message Bruce Momjian 1999-12-18 20:26:15 Re: [PATCHES] Lock