Re: pretty print viewdefs
От | Andreas Pflug |
---|---|
Тема | Re: pretty print viewdefs |
Дата | |
Msg-id | 4A956376.4050106@pse-consulting.de обсуждение исходный текст |
Ответ на | Re: pretty print viewdefs (Andrew Dunstan <andrew@dunslane.net>) |
Ответы |
Re: pretty print viewdefs
|
Список | 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
В списке pgsql-hackers по дате отправления: