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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to