On Wed, Aug 26, 2009 at 11:49 PM, Andrew Dunstan<and...@dunslane.net> wrote: > Maybe we need a couple of extra pg_get_viewdef() variants. One to wrap on > some provided line length, one to wrap on every column. psql could use the > first, pg_dump could use the second. > > I really can't believe anyone wants a single line with 1600 column specs ...
Uhm, why not? People generally don't care about the list of columns at all if it's just generated by "select *". If they're reading it at all it's to see the WHERE clauses and FROM clauses and so on. I think wrapping it at 80 columns gets the worst of both worlds. Then you have dozens or even hundreds of lines just listing columns making it hard to see the rest of the query. 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. An alternative to my previous compromise which might be more consistent: List the columns one per line if *any* of the columns has an alias or is a complex expression. If they're all simple columns then put them all one line. At least that way you won't have any weird column lists that switch back and forth between styles. -- greg http://mit.edu/~gsstark/resume.pdf -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers