customize pager in psql

From the fine psql manual:

\pset option [ value ]
[…]
pager
Controls use of a pager
program for query and psql help output. If the environment variable
PAGER is set, the output is piped to the specified program.
Otherwise a platform-dependent default (such as more) is used.

When the pager option is off, the pager program is not used. When the pager option is on, the pager is used when appropriate

So you can say this from the psql prompt:

psql> \pset pager off

to turn the pager off. If you want this to always apply, you can add \pset pager off to your ~/.psqlrc file.

You can also use \? from the psql prompt to get a quick summary of the special commands at your disposal.

Leave a Comment

tech