Skip to content

Instantly share code, notes, and snippets.

@kevlarr
Last active November 8, 2019 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevlarr/0f9500fef783a04c0aaa10581e738b3b to your computer and use it in GitHub Desktop.
Save kevlarr/0f9500fef783a04c0aaa10581e738b3b to your computer and use it in GitHub Desktop.
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
\set COMP_KEYWORD_CASE upper
-- 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