Re: [HACKERS] psql: new help related to variables are not too readable - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [HACKERS] psql: new help related to variables are not too readable
Date
Msg-id CAFj8pRAtQDX+U_xZqiNatD+uEbDwm2199M-f9ygwJ8Vcf-3fEQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] psql: new help related to variables are not too readable  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] psql: new help related to variables are not tooreadable
List pgsql-hackers


2017-09-14 16:35 GMT+02:00 Pavel Stehule <pavel.stehule@gmail.com>:


2017-09-14 15:17 GMT+02:00 Alvaro Herrera <alvherre@alvh.no-ip.org>:
Tom Lane wrote:
> "David G. Johnston" <david.g.johnston@gmail.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


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the sametransaction
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Setting pd_lower in GIN metapage