---
name: "pspg"
section: "1"
platform: "linux"
package: "pspg"
version: "5.8.9-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pspg"
---

# pspg(1)

PostgreSQL pager

## NAME

pspg - PostgreSQL pager

## DESCRIPTION

pspg is a Unix pager designed for table browsing.

### Usage:

-

  pspg \[OPTION\] \[file\]

### General options:

- **--about**

  about authors

- **--help**

  show this help

- **-V**, **--version**

  show version

- **--info**

  show info about libraries and system

- **--direct-color**

  use direct true colors

- **-f**, **--file**=*FILE*

  open file

- **-F**, **--quit-if-one-screen**

  quit if content is one screen

- **--clipboard-app**=*NUM*

  specify app used by copy to clipboard (1, 2, 3, 4)

- **--esc-delay**=*NUM*

  specify escape delay in ms (**-1** inf, 0 not used, )

- **--interactive**

  force interactive mode

- **--ignore\_file\_suffix**

  don't try to deduce format from file suffix

- **--ni**

  not interactive mode (only for csv and query)

- **--no-mouse**

  don't use own mouse handling

- **--no-progressive-load**

  don't use progressive data load

**--no-sigint-search-reset**

- **--no-watch-file**

  don't watch inotify event of file without reset searching on sigint (CTRL C)

- **--no-sleep**

  without waits against flickering

- **--no-xterm-mouse-mode**

  don't use optional xterm mouse mode

- **--only-for-tables**

  use std pager when content is not table

- **--on-sigint-exit**

  exit on sigint(CTRL C or Escape)

- **--pgcli-fix**

  try to fix some pgcli related issues

- **--querystream**

  read queries from stream forever

- **--quit-on-f3**

  exit on F3 like mc viewers

- **--rr**=*ROWNUM*

  rows reserved for specific purposes

- **--stream**

  read input forever

- **-X**, **--reprint-on-exit**

  preserve content after exit

### Output format options:

- **-a**, **--ascii** decor

  force ascii

- **-b**, **--blackwhite**

  black-white style

- **-s**, **--style**=*N*

  set color style number (0..23)

- **--bold-labels**

  row, column labels use bold font

- **--bold-cursor**

  cursor use bold font

- **--border**

  type of borders (0..2)

- **--custom-style**=*NAME*

  name of custom color style

- **--double-header**

  header separator uses double lines

- **--force-uniborder**

  replace ascii borders by unicode borders

- **--hide-header-line**

  hides header line

- **--highlight-odd-rec**

  use special style for odd records

- **--ignore-short-rows**

  rows with wrong column numbers are ignored

- **--null**=*STRING*

  STRING used instead NULL

Searching options

- **-g** **--hlite-search**, **-G** **--HILITE-SEARCH**

  don't highlight lines for searches

- **-i** **--ignore-case**

  ignore case in searches that do not contain uppercase

- **-I** **--IGNORE-CASE**

  ignore case in all searches

### Interface options:

- **-c**, **--freezecols**=*N*

  freeze N columns (0..9)

- **--less-status-bar**

  status bar like less pager

- **--line-numbers**

  show line number column

- **--menu-always**

  show top bar menu every time

- **--no-bars**, **--no-commandbar**, **--no-topbar**

  don't show bottom, top bar or both

- **--no-cursor**

  row cursor will be hidden

- **--no-last-row-search**

  don't use the last pattern when starting a new search

- **--no-scrollbar**

  don't show scrollbar

- **--no-sound**

  don't use beep when scroll is not possible

- **--tabular-cursor**

  cursor is visible only when data has table format

- **--vertical-cursor**

  show vertical column cursor

### Input format options:

- **--csv**

  input stream has csv format

- **--csv-separator**

  char used as field separator

- **--csv-header** \[on/off\]

  specify header line usage

- **--skip-columns-like=**"SPACE SEPARATED STRING LIST"

  columns with substr in name are ignored

- **--csv-trim-width**=*NUM*

  trim value after NUM chars

- **--csv-trim-rows**=*NUM*

  trim value after NUM rows

- **--tsv**

  input stream has tsv format

### On exit options:

- **--on-exit-reset**

  sends reset terminal sequence "\\33c"

- **--on-exit-clean**

  sends clean terminal sequence "\\033\[2J"

- **--on-exit-erase-line**

  sends erase line terminal sequence "\\033\[2K\\r"

- **--on-exit-sgr0**

  sends sgr0 terminal sequence "\\033\[0;10m"

### Watch mode options:

- **-q**, **--query**=*QUERY*

  execute query

- **-w**, **--watch** time

  the query (or read file) is repeated every time (sec)

### Connection options:

- **-d**, **--dbname**=*DBNAME*

  database name

- **-h**, **--host**=*HOSTNAME*

  database server host (default: "local socket")

- **-p**, **--port**=*PORT*

  database server port (default: "5432")

- **-U**, **--username**=*USERNAME*

  database user name

- **-W**, **--password**

  force password prompt

### Debug options:

- **--log**=*FILE*

  log debug info to file

- **--wait**=*NUM*

  wait NUM seconds to allow attach from a debugger

pspg shares lot of key commands with less pager or vi editor.
