Pavel Stehule wrote:
I am not sure - this should by task for client application.


pg_get_viewdef() already has a pretty print mode, and this change would only affect output from that mode. Non-pretty printed output would be unchanged.

My argument is that the pretty print mode for target lists is not at all pretty.

I don't see why this has the be invented in every client. Then we'd have to do it in psql, pg_dump and so on. If any client doesn't like our pretty print output it can get the raw viewdef and do its own formatting.

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.


Is there any objection?

I thing so default should be unformated with some pretty printing support.


Please look at the function definition. You already have the option of formatted or unformatted output.

cheers

andrew

--
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