Re: reprise: pretty print viewdefs
Greg Stark <stark@mit.edu>
From: Greg Stark <stark@mit.edu>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Robert Haas <robertmhaas@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-12-24T19:26:16Z
Lists: pgsql-hackers
On Thu, Dec 22, 2011 at 5:52 PM, Andrew Dunstan <andrew@dunslane.net> wrote: > I've looked at that, and it was discussed a bit previously. It's more > complex because it requires that we keep track of (or calculate) where we > are on the line, You might try a compromise, just spit out all the columns on one line *unless* either the previous or next column is longer than something like 30 columns. So if you have a long list of short columns it just gets wrapped by your terminal but if you have complex expressions like CASE expressions or casts or so on they go on a line by themselves. -- greg