Re: pgindent wishlist item

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: pgindent wishlist item
Date: 2014-01-31 18:37:24
Message-ID: 20140131183724.GK19957@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 31, 2014 at 12:44:22PM -0500, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > While Bruce is working on pgindent, let me register a small wishlist
> > item. It would be quite useful to be able to supply extra typedefs on
> > the command line to supplement a typedefs file downloaded from the
> > buildfarm or constructed however. A concrete example: in the code I have
> > been recently working on, there are typedefs for Jsonb and JsonbValue.
> > If I run pgindent as normal on the new code these items are not treated
> > properly. What I had to do was take a special copy of the typedefs list
> > and add those two items. If we could pass a list of extra typedefs to
> > supplement the typedefs file that would be very useful. Then I could do
> > something like:
>
> > pgindent --typedef Jsonb --typedef JsonbValue
> > src/backend/utils/adt/jsonfuncs.c
>
> > without having to mangle a typedefs file.
>
> Personally, I always just edit the downloaded file to add whatever
> typedefs the patch I'm working on adds. I wouldn't use a command
> line switch even if there was one, because then I'd have to remember
> which typedef names to add each time I run pgindent.

Easily added, so done with the attached, applied patch. You use it
like this:

pgindent --list-of-typedefs 'abc def'

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

+ Everyone has their own god. +

Attachment Content-Type Size
pgindent.diff text/x-diff 1.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Claudio Freire 2014-01-31 18:37:40 Re: Prefix compression of B-Tree keys
Previous Message Marko Kreen 2014-01-31 18:24:39 Re: [COMMITTERS] pgsql: libpq: Support TLS versions beyond TLSv1.