Re: pl/python refactoring
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Peter Eisentraut <peter_e@gmx.net>, Jan Urbański <wulczer@wulczer.org>, Postgres - Hackers <pgsql-hackers@postgresql.org>
Date: 2011-01-19T17:20:00Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes: > Excerpts from Peter Eisentraut's message of mar ene 18 19:22:50 -0300 2011: >> #16: This is probably pointless because pgindent will reformat this. > pgindent used to remove useless braces around single-statement blocks, > but this behavior was removed years ago because it'd break formatting > around PG_TRY blocks. Yeah. FWIW, I concur with Jan that this is a readability improvement. A comment and a statement always look like two statements to me --- and the fact that pgindent insists on inserting a blank line in front of the comment in this scenario does even more to mangle the visual impression of what the "if" controls. +1 for the braces. regards, tom lane