-
Notifications
You must be signed in to change notification settings - Fork 17
/
psqlrc
27 lines (22 loc) · 933 Bytes
/
psqlrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
-- Don't display the "helpful" message on startup.
\set QUIET 1
\pset null '[NULL]'
-- use pspg as the pager for psql. It is an ncurses like interface for browsing
-- tabular data https://github.com/okbob/pspg
\setenv PAGER 'pspg --style 17 --menu-always --ignore-case --highlight-odd-rec --double-header --bold-labels --bold-cursor'
-- fancy borders
\pset linestyle unicode
\pset border 2
-- http://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-PROMPTING
\set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# '
-- PROMPT2 is printed when the prompt expects more input, like when you type
-- SELECT * FROM<enter>. %R shows what type of input it expects.
\set PROMPT2 '[more] %R > '
-- Show how long each query takes to execute
\timing
-- Use best available output format
\set VERBOSITY verbose
\set HISTFILE ~/.local/share/psql/.psql_history- :DBNAME
\set HISTCONTROL ignoredups
\set COMP_KEYWORD_CASE upper
\unset QUIET