Stochastic Nonsense

Put something smart here.

Horizontal Paging of Greenplum or Postgres Queries

When using gpsql or pgsql to query greenplum or postgres respectively, query results which exceed the width of your term will wrap in a very annoying fashion. To get horizontal paging, set the environmental variable PAGER:

export PAGER='less -RSFX'

then either in your psql or gpsql session, or in your .psqlrc file,

\pset pager always

Note that if you just want the pager for long output, not wide, you can omit the always from the pset command.