Re: [HACKERS] pgindent vs try/catch

2004-09-12 Thread Bruce Momjian
OK, it never removed braces from things like: int x; { int x; x=5; } but anyway I think we all agree it was uglifying the code more than it was clarifying. --- Gaeta

Re: [HACKERS] pgindent vs try/catch

2004-09-12 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruce Momjian wrote: | Gaetano Mendola wrote: | |>>I had that argument a while ago with Bruce and lost :-) . It does horrible |>>things to if/else constructs too. The workaround is to put a comment in the |>>block. On the whole I agree with you, though.

Re: [HACKERS] pgindent vs try/catch

2004-09-12 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I have removed the code from pgindent. Now how do we clean up the > try/catch code that got messed up? I've hand-restored the cases that are in the files I'm currently editing. I'll look for more later. regards, tom lane -

Re: [HACKERS] pgindent vs try/catch

2004-09-12 Thread Bruce Momjian
Andrew Dunstan wrote: > I had that argument a while ago with Bruce and lost :-) . It does horrible > things to if/else constructs too. The workaround is to put a comment in the > block. On the whole I agree with you, though. If I put braces in my program > it's for a reason, and the indenter should

Re: [HACKERS] pgindent vs try/catch

2004-09-12 Thread Gaetano Mendola
Andrew Dunstan wrote: Tom Lane said: I'm fairly displeased with what pgindent has done to single-line PG_TRY constructs, as in this example from pl_exec.c: *** exec_stmt_block(PLpgSQL_execstate * esta *** 911,922 SPI_result_code_string(xrc));

Re: [HACKERS] pgindent vs try/catch

2004-09-12 Thread Andrew Dunstan
Tom Lane said: > I'm fairly displeased with what pgindent has done to single-line PG_TRY > constructs, as in this example from pl_exec.c: > > *** exec_stmt_block(PLpgSQL_execstate * esta > *** 911,922 > SPI_result_code_string(xrc)); > >