Re: Fwd: Another little thing about psql wrapped expanded output

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fwd: Another little thing about psql wrapped expanded output
Дата
Msg-id 28797.1449095077@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Fwd: Another little thing about psql wrapped expanded output  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: Fwd: Another little thing about psql wrapped expanded output  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes:
> On Wed, Dec 2, 2015 at 12:37 PM, Josh Berkus <josh@agliodbs.com> wrote:
>> If you're fixing the dashed-line code, is there a way to say that we
>> never have more than a reasonable number of dashes (ideally, the width
>> of the terminal) no matter how wide the data is?  Having 4000 dashes
>> because of large text on one row is kinda painful, and not at all useful.

> If you use the default format (\pset format aligned) in expanded mode, then
> I agree with you we shouldn't print a half screen full of dashes to
> separate every tuple.

Don't think I agree.  Suppose that you have a wider-than-screen table
and you use a pager to scroll left and right in that.  If we shorten the
dashed lines, then once you scroll to the right of wherever they stop,
you lose that visual cue separating the rows.  This matters a lot if
only a few of the column values are very wide: everywhere else, there's
gonna be lots of whitespace.

In the situation you are describing, you've already pretty much lost
user-friendliness of the display, and the only way to get it back is
to use a suitable pager (or make the window bigger, but that only goes
so far).  So I don't think we should optimize the non-pager case at
the expense of the pager case.

It's possible that it'd be worth the trouble to give psql two operating
modes, one for pagers with left-right scroll ability and one for those
without.  But that would be a good deal more work than what I propose
to do at the moment.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: proposal: function parse_ident
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Removing Functionally Dependent GROUP BY Columns