Re: pgindent wishlist item - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgindent wishlist item
Date
Msg-id 17640.1391190262@sss.pgh.pa.us
Whole thread Raw
In response to pgindent wishlist item  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pgindent wishlist item  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.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.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: bgworker crashed or not?
Next
From: Stephen Frost
Date:
Subject: Re: ALTER TABLESPACE ... MOVE ALL TO ...