Skip to content

Instantly share code, notes, and snippets.



Last active Nov 8, 2019
What would you like to do?
psql config
\set QUIET 1
-- Don't page output that's bigger than screen,
-- because scrolling is a thing that works
\pset pager off
-- Auto-expand when too much data for table view
\x auto
-- Make null pretty
\pset null '∅'
-- Always show query time
\timing on
-- Autocomplete keywords in uppercase
-- Don't log duplicate queries to history
\set HISTCONTROL ignoredups
-- A minimal prompt: show (super)user, name, host, database, and
-- transaction status bold on first line, with all typing done
-- on blank new lines for clarity
\set PROMPT1 '\n%# %[%033[1m%]%n@%M/%~%x %[%033[0m%]\n\n'
\set PROMPT2 ''
-- Better error messages
\set VERBOSITY verbose
\unset quiet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment