Re: pg_get_viewdefs() indentation considered harmful

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_get_viewdefs() indentation considered harmful
Date: 2014-04-29 18:46:11
Message-ID: 10992.1398797171@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <stark(at)mit(dot)edu> writes:
> I propose the attached patch. It wraps at 40 and also divides the
> indent level by half the std indent level. I tried a few different
> combinations and this is the one that produced the output I liked
> best.

I doubt you can do that (the half-size-step bit), at least not without
a much larger patch than this: there are assorted places that just
unconditionally append PRETTYINDENT_STD spaces, and would have to be
taught to do something different. OTOH those places might need to be
adjusted anyway.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2014-04-29 19:02:45 Re: Should pg_stat_bgwriter.buffers_backend_fsync be removed?
Previous Message Greg Stark 2014-04-29 18:25:23 Re: pg_get_viewdefs() indentation considered harmful