Re: psql wrapped format default for backslash-d commands

From: "Brendan Jurd" <direvus(at)gmail(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql wrapped format default for backslash-d commands
Date: 2008-05-09 18:31:31
Message-ID: 37ed240d0805091131s73fa6b77r57d4885c2beaca74@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, May 10, 2008 at 3:52 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Now that psql '\pset format wrapped' is in CVS, we should consider when
> we want to use 'wrapped' format by default. I think psql \df and \dT
> certainly can benefit from wrapped mode. \df+ even displays, though
> there is quite a bit of wrapping.
>

I for one would definitely like backslash commands with very wide
output to be wrapped by default.

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

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

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.

Cheers,
BJ

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-05-09 18:37:44 Re: psql wrapped format default for backslash-d commands
Previous Message Jan Urbański 2008-05-09 18:17:22 gsoc08, text search selectivity, pg_statistics holding an array of a different type