From: | Brendan Jurd <direvus(at)gmail(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | psql: Activate pager only for height, not width |
Date: | 2017-05-29 05:09:49 |
Message-ID: | CADxJZo1bDqDrXry5vwLtM5jfZKSw1i9o9DoWYFP+RCw8RuWAKA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello hackers,
I am often frustrated by the default behaviour of the psql pager, which
will activate a pager if the output is deemed to be "too wide" for the
terminal, regardless of the number of lines output, and of the
pager_min_lines setting.
This behaviour is sometimes desirable, but in my use patterns it is more
often the case that I want the pager to activate for output longer than
terminal height, whereas for output a little wider than the terminal, I am
happy for there to be some wrapping. This is especially the case with "\d"
output for tables, where, at 80 columns, very often the only wrapping is in
the table borders and constraint/trigger definitions.
Usually I turn the pager off completely, and only switch it on when I am
about to execute something that will return many rows, but what I'd really
like is some way to tell psql to activate the pager as normal for height,
but to ignore width. My first thought was an alternate mode to \pset pager
-- to {'on' | 'off' | 'always'} we could add 'height'.
Another option is to add the ability to specify the number of columns which
psql considers "too wide", analogous to pager_min_lines. I could then set
pager_min_cols to something around 150 which would work nicely for my
situation.
I don't have strong opinions about how the options are constructed, as long
as it is possible to obtain the behaviour.
I would be happy to produce a patch, if this seems like an acceptable
feature add.
Regards,
BJ
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Kirkwood | 2017-05-29 05:12:45 | Re: logical replication - still unstable after all these months |
Previous Message | Mark Kirkwood | 2017-05-29 05:06:37 | Re: logical replication - still unstable after all these months |