Re: pretty print viewdefs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, decibel <decibel(at)decibel(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pretty print viewdefs
Date: 2009-08-26 22:07:18
Message-ID: 20355.1251324438@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <gsstark(at)mit(dot)edu> writes:
> I agree with Tom's concerns -- think of that guy who was bumping up
> against the 1600 column limit. At least if they're on one line you can
> still see the structure of the query albeit with a very very wide
> scrollbar...

> But for typical queries I do agree one per line is better. That is
> actually how I format my queries when they have complex expressions in
> the target list. Perhaps formatting one per line whenever there's an
> alias or the value is a complex expression but putting any unaliased
> columns (such as produced by select *) in a single line would be a
> good compromise?

Yeah, I was wondering about adopting some rule like that too.

It would be pretty easy to adjust that loop so that columns that aren't
simple Vars are put on their own line, while Vars are allowed to share
a line. I dunno whether users would see that as inconsistent, though.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-26 22:15:18 Re: 8.5 release timetable, again
Previous Message Dimitri Fontaine 2009-08-26 22:03:05 Re: 8.5 release timetable, again