Brendan Jurd wrote:

[ email paragraphs reordered.]

> I seem to recall there was some discussion of an "auto" mode in the
> original wrapping thread, but if there was any meaningful conclusion I
> lost it in amongst the width detection flame war.

I wasn't going to bring up the 'auto' idea yet because it might confuse
things, but I guess I should address it now.

"wrapped" format doesn't wrap if the column headings don't fit the
screen width _without_ wrapping (it then uses 'aligned').  My idea was
for an 'auto' format mode to use wrapped, or expanded if wrapped can't
be displayed.

> > The attached patch uses wrapped format for \d* output if the current
> > output format is 'aligned'.  It certainly helps the \df and \dT because
> > those outputs have normally narrow values with a few wide values that
> > cause aligned output to be much too wide.  The downside of the patch is
> > that you can no longer get 'aligned' output for \d* commands anymore
> > because there is no way to know if the user specified 'aligned' or if
> > they are just using the default.
> >
> 
> Doesn't this suggest that we need an "auto" formatting mode which has
> the semantics "let psql decide what format mode I want"?

The big problem is unless we default psql to 'auto' we can't know if
they really want 'aligned', 'wrapped', or whatever looks good on the
screen, 'auto'.

> Then the people who object to wrapped mode can just set formatting to
> aligned explicitly and be done with it.

Right, but 'wrapped' is kind of a dramatic change so we have to be sure
most people wanted 'wrapped' (or 'auto').  I think the way we did the
detection defaults will help because a default of 'auto' will only
affect screen output, by default.

-- 
  Bruce Momjian  <[EMAIL PROTECTED]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

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