Re: pretty print viewdefs - Mailing list pgsql-hackers

From Greg Stark
Subject Re: pretty print viewdefs
Date
Msg-id 407d949e0908261935s2ecbe22axc3478a937f200608@mail.gmail.com
Whole thread Raw
In response to Re: pretty print viewdefs  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pretty print viewdefs  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pretty print viewdefs  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Thu, Aug 27, 2009 at 1:00 AM, Andrew Dunstan<andrew@dunslane.net> wrote:
> Greg Stark wrote:
>>
>> At least if it's all on one line
>> you can just not scroll to the right and see the rest of the query on
>> your screen.
>
> This is where the confusion arises.
>
> This is not possible on any terminal program I use - they don't scroll left
> and right, they wrap, and the result in this case is horrible.

Well then you need a better terminal? Or you need to do your
programming in a text editor and not a terminal? Surely *any*
significant view definition will overflow on a terminal?

Incidentally I just tried
\d information_schema.views

and it *does* seem to put newlines after some of the target list
items. After each of the CASE expressions it puts a newline. So you
*already* get a mixture of some multiple items on a line and some
one-per-line.

So I think I'm back to my original suggestion, put any item with a
complex expression or an alias on a line by itself. Any plain column
names can be listed on a single line.

-- 
greg
http://mit.edu/~gsstark/resume.pdf


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pretty print viewdefs
Next
From: Tom Lane
Date:
Subject: Re: pretty print viewdefs