From 5e8304fdce2d5c41ef7a648ed0a622480f8f0a07 Mon Sep 17 00:00:00 2001
From: Tom Lane
Date: Tue, 5 Sep 2017 12:02:06 -0400
Subject: In psql, use PSQL_PAGER in preference to PAGER, if it's set.
This allows the user's environment to set up a psql-specific choice
of pager, in much the same way that we provide PSQL_EDITOR to allow
a psql-specific override of the more widely known EDITOR variable.
Pavel Stehule, reviewed by Thomas Munro
Discussion: https://postgr.es/m/CAFj8pRD3RRk9S1eRbnGm_T6brc3Ss5mohraNzTSJquzx+pmtKA@mail.gmail.com
---
doc/src/sgml/ref/psql-ref.sgml | 51 ++++++++++++++++++++++--------------------
1 file changed, 27 insertions(+), 24 deletions(-)
(limited to 'doc/src')
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 868de184184..fd2ca15d0aa 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -2665,10 +2665,10 @@ lo_import 152801
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.
+ help output. If the environment variable PSQL_PAGER
+ or PAGER is set, the output is piped to the
+ specified program. Otherwise a platform-dependent default program
+ (such as more) is used.
@@ -4106,21 +4106,6 @@ $endif
-
- PAGER
-
-
-
- If the query results do not fit on the screen, they are piped
- through this command. Typical values are
- more or less. The default
- is platform-dependent. Use of the pager can be disabled by setting
- PAGER to empty, or by using pager-related options of
- the \pset command.
-
-
-
-
PGDATABASE
PGHOST
@@ -4145,11 +4130,8 @@ $endif
and \ev commands.
These variables are examined in the order listed;
the first that is set is used.
-
-
-
- The built-in default editors are vi on Unix
- systems and notepad.exe on Windows systems.
+ If none of them is set, the default is to use vi
+ on Unix systems or notepad.exe on Windows systems.
@@ -4192,6 +4174,27 @@ PSQL_EDITOR_LINENUMBER_ARG='--line '
+
+ PSQL_PAGER
+ PAGER
+
+
+
+ If a query's results do not fit on the screen, they are piped
+ through this command. Typical values are more
+ or less.
+ Use of the pager can be disabled by setting PSQL_PAGER
+ or PAGER to an empty string, or by adjusting the
+ pager-related options of the \pset command.
+ These variables are examined in the order listed;
+ the first that is set is used.
+ If none of them is set, the default is to use more> on most
+ platforms, but less> on Cygwin.
+
+
+
+
+
PSQLRC
--
cgit v1.2.3