-
Notifications
You must be signed in to change notification settings - Fork 0
/
psqlrc
22 lines (21 loc) · 789 Bytes
/
psqlrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- Turn on message output, which can mess up some scripts
\set QUIET 1
-- 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 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
\set HISTSIZE 10000
-- Autocomplete keywords (like SELECT) in upper-case, even if you started
-- typing them in lower case.
\set COMP_KEYWORD_CASE upper
--Pretty prompt
\set PROMPT1 '%[%033[31m%]%n@%M %/%R%[%033[0m%]%# '
-- Use best available output format
-- as in some cases we would just want to use expanded
\x auto
--automatically add timing
\timing
\unset QUIET