Re: Formatting Curmudgeons WAS: MMAP Buffers

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Christopher Browne <cbbrowne(at)gmail(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Formatting Curmudgeons WAS: MMAP Buffers
Date: 2011-04-17 08:31:59
Message-ID: 4DAAA57F.4090508@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/17/2011 04:08 AM, Greg Smith wrote:
> Andrew Dunstan wrote:
>> What makes you think this isn't possible to run pgindent? There are
>> no secret incantations.
>
> The first hit newbies find looking for info about pgident is
> http://blog.hagander.net/archives/185-pgindent-vs-dash.html which sure
> looks like secret incantations to me. The documentation
> src/tools/pgindent/README reads like a magic spell too:
>
> find . -name '*.[ch]' -type f -print | \
> egrep -v -f src/tools/pgindent/exclude_file_patterns | \
> xargs -n100 pgindent src/tools/pgindent/typedefs.list

That's the incantation for indenting the whole of the source code. But
very few people want to do that. Most people just want to indent a
single file, for which the incantation is "pgindent path_to_typedefs
my_file.c". See in another message my suggestion for defaulting the
typedefs arg, so you'd just be able to say "pg_indent my_file.c".

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-04-17 09:11:58 Re: ALTER TABLE INHERIT vs collations
Previous Message Andrew Dunstan 2011-04-17 08:26:21 Re: Formatting Curmudgeons WAS: MMAP Buffers