Re: psql: new help related to variables are not too readable

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: psql: new help related to variables are not too readable
Date: 2017-09-16 13:00:48
Message-ID: CAFj8pRAtQDX+U_xZqiNatD+uEbDwm2199M-f9ygwJ8Vcf-3fEQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2017-09-14 16:35 GMT+02:00 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:

>
>
> 2017-09-14 15:17 GMT+02:00 Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>:
>
>> Tom Lane wrote:
>> > "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
>> > >​If I was going to try and read it like a book I'd want the extra
>> > > white-space to make doing so easier (white-space gives the eye a
>> breather
>> > > when done with a particular concept) - and the length wouldn't really
>> > > matter since I'd just make a single pass and be done with it. But the
>> > > planned usage is for quick lookup of options that you know (or at
>> least
>> > > suspect) exist and which you probably have an approximate idea of how
>> they
>> > > are spelled. The all-caps and left-justified block headers are
>> distinct
>> > > enough to scan down - though I'd consider indenting 4 spaces instead
>> of 2
>> > > to make that even easier (less effort to ignore the indented lines
>> since
>> > > ignoring nothing is easier than ignoring something).​ Having more
>> fit on
>> > > one screen makes that vertical skimming considerably easier as well
>> (no
>> > > break and re-acquire when scrolling in a new page).
>> >
>> > Hmm, indenting the descriptions a couple more spaces might be a workable
>> > compromise. Anyone want to try that and see what it looks like?
>> > Preferably somebody who's not happy with the current layout ;-)
>>
>> I have to admit that adding two spaces makes it look a lot more
>> acceptable to me.
>>
>
> I did some tests now, and when the name of variable is a upper case
> string, then are acceptable (although with empty line space it is better).
>
> for pset variables (is lower case), then reading is not too friendly still.
>
> Sure - four spaces is better than two - but readability is not good.
>
> There can be another reason of feeling vertical spaces - the size of
> chars. I am using probably small fonts - I am using X windows and my
> typical terminal windows is half of screen (I have T520 Lenovo) about 60
> rows and 120 columns.
>
> Please, look to document https://github.com/darold/ora2pg README and try
> to remove empty lines.
>

I am looking on man pagers - and there are very well readable

The rules are simply - when some variables are short - less than 6 chars,
then it description and label are on same line. Between items are empty
line - see "man less"

ESC-} or ^RIGHTARROW
Scroll horizontally right to show the end of the longest
displayed line.

ESC-{ or ^LEFTARROW
Scroll horizontally left back to the first column.

r or ^R or ^L
Repaint the screen.

R Repaint the screen, discarding any buffered input. Useful
if the file is changing
while it is being viewed.

F Scroll forward, and keep trying to read when the end of file
is reached. Normally
this command would be used when already at the end of the
file. It is a way to moni‐
tor the tail of a file which is growing while it is being
viewed. (The behavior is
similar to the "tail -f" command.)

ESC-F Like F, but as soon as a line is found which matches the
last search pattern, the
terminal bell is rung and forward scrolling stops.

> Regards
>
> Pavel
>
>
>>
>> (I'd tweak the description of PSQL_EDITOR_LINENUMBER_ARG by replacing
>> "how to" with "mechanism to" while at it, by the way. It took me a
>> while to understand what it was and I first thought the description was
>> completely bogus.)
>>
>> --
>> Álvaro Herrera https://www.2ndQuadrant.com/
>> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-09-16 13:45:39 Re: Setting pd_lower in GIN metapage
Previous Message Peter Eisentraut 2017-09-16 12:52:46 Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction