Re: pretty print viewdefs

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

On Thu, Aug 27, 2009 at 1:00 AM, Andrew Dunstan<andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2009-08-27 02:36:38 Re: BUG #4996: postgres.exe memory consumption keeps going up
Previous Message Andrew Dunstan 2009-08-27 02:30:15 Re: pretty print viewdefs