Thread: making "\pset pager off" the default
Hi:
How can I make "pager off" the default when running psql ?
v8.3.4 and v9.0.1 on linux.
On Wednesday, December 07, 2011 6:45:12 am Gauthier, Dave wrote: > Hi: > > How can I make "pager off" the default when running psql ? > > v8.3.4 and v9.0.1 on linux. Use a psqlrc file and add \pset pager off: http://www.postgresql.org/docs/9.0/interactive/app-psql.html " Files Unless it is passed an -X or -c option, psql attempts to read and execute commands from the system-wide psqlrc file and the user's ~/.psqlrc file before starting up. (On Windows, the user's startup file is named %APPDATA%\postgresql\psqlrc.conf.) See PREFIX/share/psqlrc.sample for information on setting up the system-wide file. It could be used to set up the client or the server to taste (using the \set and SET commands). Both the system-wide psqlrc file and the user's ~/.psqlrc file can be made version-specific by appending a dash and the PostgreSQL release number, for example ~/.psqlrc-9.0.6. A matching version-specific file will be read in preference to a non-version-specific file. The command-line history is stored in the file ~/.psql_history, or %APPDATA%\postgresql\psql_history on Windows. ' -- Adrian Klaver adrian.klaver@gmail.com
Like a charm. Thanks! -----Original Message----- From: Adrian Klaver [mailto:adrian.klaver@gmail.com] Sent: Wednesday, December 07, 2011 9:57 AM To: pgsql-general@postgresql.org Cc: Gauthier, Dave Subject: Re: [GENERAL] making "\pset pager off" the default On Wednesday, December 07, 2011 6:45:12 am Gauthier, Dave wrote: > Hi: > > How can I make "pager off" the default when running psql ? > > v8.3.4 and v9.0.1 on linux. Use a psqlrc file and add \pset pager off: http://www.postgresql.org/docs/9.0/interactive/app-psql.html " Files Unless it is passed an -X or -c option, psql attempts to read and execute commands from the system-wide psqlrc file and the user's ~/.psqlrc file before starting up. (On Windows, the user's startup file is named %APPDATA%\postgresql\psqlrc.conf.) See PREFIX/share/psqlrc.sample for information on setting up the system-wide file. It could be used to set up the client or the server to taste (using the \set and SET commands). Both the system-wide psqlrc file and the user's ~/.psqlrc file can be made version-specific by appending a dash and the PostgreSQL release number, for example ~/.psqlrc-9.0.6. A matching version-specific file will be read in preference to a non-version-specific file. The command-line history is stored in the file ~/.psql_history, or %APPDATA%\postgresql\psql_history on Windows. ' -- Adrian Klaver adrian.klaver@gmail.com
On Wed, Dec 7, 2011 at 7:45 AM, Gauthier, Dave <dave.gauthier@intel.com> wrote: > Hi: > > > > How can I make "pager off" the default when running psql ? > > > > v8.3.4 and v9.0.1 on linux. I'm sure there are more elegant ways, but: postgres@ironton:~ export PAGER=/bin/cat postgres@ironton:~ psql postgres=# select * from a; (output runs right off the bottom of the page...)