Re: [HACKERS] pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

2009-08-12 Thread Robert Haas
On Wed, Aug 12, 2009 at 9:35 AM, Tom Lane wrote: > Alvaro Herrera writes: >> Tom Lane escribió: >>> Um, sorry, no reason to do which? > >> No reason not to leave prototypes alone in the AWK code.  Isn't the >> style emitted by indent good enough already?  The comment that ctags >> needs it is prob

Re: [HACKERS] pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

2009-08-12 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane escribió: >> Um, sorry, no reason to do which? > No reason not to leave prototypes alone in the AWK code. Isn't the > style emitted by indent good enough already? The comment that ctags > needs it is probably outdated (I know my ctags, the Exuberant one, > does

Re: [HACKERS] pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

2009-08-12 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera writes: > > The reason this is like this is that the indent binary modifies the > > prototype exactly like the function definition, and then the awk program > > that's used in the pipeline "pulls up" the second line: > > > # Move prototype names to the same li

Re: [HACKERS] pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

2009-08-11 Thread Tom Lane
Alvaro Herrera writes: > The reason this is like this is that the indent binary modifies the > prototype exactly like the function definition, and then the awk program > that's used in the pipeline "pulls up" the second line: > # Move prototype names to the same line as return type. Useful for

Re: [HACKERS] pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

2009-08-11 Thread Alvaro Herrera
Tom Lane escribió: > Ah. That's a bit idiosyncratic to pgindent. What it does for a > function definition makes sense, I think: it lines up all the > parameters to start in the same column: > > static int > myfunction(int foo, >int bar) > > What is not obvious is that the same amou

Re: [HACKERS] pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

2009-08-11 Thread Tom Lane
Robert Haas writes: > On Tue, Aug 11, 2009 at 10:08 PM, Tom Lane wrote: >> If that's not it, you'd need to mention details. > Well, one thing I've noticed is that when a function prototype wraps > around to the next line, you often change the number of spaces in the > hanging indent. Ah. That's

Re: [HACKERS] pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

2009-08-11 Thread Tom Lane
Robert Haas writes: > What is a bit frustrating to me is that a number of Tom's changes to > the first two patches were trivial whitespace changes that required me > to rebase for no obvious reason. Either those changes were made > accidentally as Tom was fooling around with what I had done, or

Re: [HACKERS] pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

2009-08-11 Thread Tom Lane
Greg Stark writes: > What would happen if we ran pgindent immediately after every commit? > So nobody would ever see a checkout that wasn't pgindent-clean? > The only losers I see would be people working on multi-part patches. ... which we're trying to encourage ... Actually, the case that star

[HACKERS] pgindent timing (was Re: [COMMITTERS] pgsql: Refactor NUM_cache_remove calls in error report path to a PG_TRY)

2009-08-11 Thread Tom Lane
Robert Haas writes: > On Mon, Aug 10, 2009 at 6:52 PM, Tom Lane wrote: >> Only if they aren't applied by then. One reason that we normally only >> run pgindent at the end of the devel cycle is that that's when >> (presumably) the smallest amount of patches remain outstanding. > OK, I get it. Th