Reference

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-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.

History

--IGNORE-CASE since Debian 11 (Bullseye); --about since Debian 11 (Bullseye); --ascii since Debian 11 (Bullseye); --blackwhite since Debian 11 (Bullseye); --bold-cursor since Debian 11 (Bullseye); --bold-labels since Debian 11 (Bullseye); --border since Debian 11 (Bullseye); --clipboard-app since Debian 12 (Bookworm); --csv since Debian 11 (Bullseye); --csv-header since Debian 11 (Bullseye); --csv-separator since Debian 11 (Bullseye); --csv-trim-rows since Debian 13 (Trixie); --csv-trim-width since Debian 13 (Trixie); --custom-style since Debian 12 (Bookworm); --dbname since Debian 11 (Bullseye); --direct-color since Debian 12 (Bookworm); --double-header since Debian 11 (Bullseye); --esc-delay since Debian 12 (Bookworm); --file since Debian 11 (Bullseye); --force-uniborder since Debian 11 (Bullseye); --freezecols since Debian 11 (Bullseye); --hide-header-line since Debian 12 (Bookworm); --highlight-odd-rec since Debian 12 (Bookworm); --host since Debian 11 (Bullseye); --ignore-case since Debian 11 (Bullseye); --ignore-short-rows since Debian 13 (Trixie); --ignore_file_suffix since Debian 11 (Bullseye); --info since Debian 12 (Bookworm); --interactive since Debian 11 (Bullseye); --less-status-bar since Debian 11 (Bullseye); --line-numbers since Debian 11 (Bullseye); --log since Debian 11 (Bullseye); --menu-always since Debian 12 (Bookworm); --ni since Debian 11 (Bullseye); --no-bars since Debian 11 (Bullseye); --no-commandbar since Debian 11 (Bullseye); --no-last-row-search since Debian 12 (Bookworm); --no-progressive-load since Debian 12 (Bookworm); --no-scrollbar since Debian 12 (Bookworm); --no-sleep since Debian 12 (Bookworm); --no-topbar since Debian 11 (Bullseye); --no-watch-file since Debian 11 (Bullseye); --no-xterm-mouse-mode since Debian 12 (Bookworm); --null since Debian 11 (Bullseye); --on-exit-clean since Debian 12 (Bookworm); --on-exit-erase-line since Debian 12 (Bookworm); --on-exit-reset since Debian 12 (Bookworm); --on-exit-sgr0 since Debian 12 (Bookworm); --on-sigint-exit since Debian 12 (Bookworm); --only-for-tables since Debian 11 (Bullseye); --password since Debian 11 (Bullseye); --pgcli-fix since Debian 11 (Bullseye); --port since Debian 11 (Bullseye); --query since Debian 11 (Bullseye); --querystream since Debian 12 (Bookworm); --quit-if-one-screen since Debian 11 (Bullseye); --quit-on-f3 since Debian 11 (Bullseye); --reprint-on-exit since Debian 11 (Bullseye); --rr since Debian 11 (Bullseye); --stream since Debian 11 (Bullseye); --style since Debian 11 (Bullseye); --tabular-cursor since Debian 11 (Bullseye); --tsv since Debian 11 (Bullseye); --username since Debian 11 (Bullseye); --vertical-cursor since Debian 11 (Bullseye); --wait since Debian 11 (Bullseye); --watch since Debian 11 (Bullseye); -F since Debian 11 (Bullseye); -I since Debian 11 (Bullseye); -U since Debian 11 (Bullseye); -W since Debian 11 (Bullseye); -d since Debian 11 (Bullseye); -h since Debian 11 (Bullseye); -i since Debian 11 (Bullseye); -p since Debian 11 (Bullseye); -q since Debian 11 (Bullseye); -w since Debian 11 (Bullseye).

--hold-stream until Debian 11 (Bullseye); --ignore-bad-rows until Debian 12 (Bookworm); --no-sigint-exit until Debian 11 (Bullseye); --no-sigint-search-reset until Debian 11 (Bullseye); --no_xterm_mouse_mode until Debian 11 (Bullseye).