Skip to content

Instantly share code, notes, and snippets.

@aar0nTw
Created March 17, 2014 18:26
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 aar0nTw/9605296 to your computer and use it in GitHub Desktop.
Save aar0nTw/9605296 to your computer and use it in GitHub Desktop.
\set PROMPT1 '%[%033[1m%]%M %001%[%033[1;33;40m%]%002%n@%/%R%001%[%033[0m%]%002%# '
\set PROMPT2 '[more] %R > '
-- By default, NULL displays as an empty space. Is it actually an empty
-- string, or is it null? This makes that distinction visible.
\pset null '[NULL]'
-- Use table format (with headers across the top) by default, but switch to
-- expanded table format when there's a lot of data, which makes it much
-- easier to read.
\x auto
-- Verbose error reports.
\set VERBOSITY verbose
-- Use a separate history file per-database.
\set HISTFILE ~/.psql_history- :DBNAME
-- If a command is run more than once in a row, only store it once in the
-- history.
\set HISTCONTROL ignoredups
-- Autocomplete keywords (like SELECT) in upper-case, even if you started
-- typing them in lower case.
\set COMP_KEYWORD_CASE upper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment