Re: pretty print viewdefs

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pretty print viewdefs
Date: 2009-08-26 16:31:50
Message-ID: 4A956376.4050106@pse-consulting.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan wrote:
>
>
>> But Pg
>> should have some pretty print function - it is easy implemented there.
>> Personally, I prefere Celko's notation, it is little bit more compact
>>
>> SELECT sh.shoename, sh.sh_avail, sh.slcolor, sh.slminlen,
>> sh.slminlen * un.un_fact AS slminlen_cm, sh.slmaxlen,
>> sh.slmaxlen * un.un_fact AS slmaxlen_cm, sh.slunit
>> FROM shoe_data sh, unit un
>> WHERE sh.slunit = un.un_name;
>>
>> but, sure - this is my personal preference.
>>
>
>
> To do that we would need to keep track of how much space was used on
> the line and how much space what we were adding would use. It's
> doable, but it's a lot more work.

When initially implementing the pretty option, I ran into the same
consideration. Back then, I decided not to try any line breaking on the
column list. Instead, I treated the columns as "just a bunch of
columns", laying the emphasis on the from-clause (with potentially many
joined tables).
So a pretty column formatting should still be white-space saving.

Regards,
Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John R Pierce 2009-08-26 16:34:17 Re: BUG #4996: postgres.exe memory consumption keeps going up
Previous Message Kevin Grittner 2009-08-26 16:25:47 Re: 8.5 release timetable, again