-
Notifications
You must be signed in to change notification settings - Fork 0
/
.psqlrc
40 lines (29 loc) · 983 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
28
29
30
31
32
33
34
35
36
37
38
39
40
-- don't print out anything when running the following commands
\set QUIET 1
-- don't ignore errors, abort immediately at first error
\set ON_ERROR_ROLLBACK interactive
-- print time it took to execute query after every statement
\timing
\set VERBOSITY verbose
\set ECHO_HIDDEN on
-- print columns on separate lines if columns are too wide - disabled because this is stupid, make your terminal wider
-- \x auto
\set PROMPT1 '%[%033[1m%]%M/%/%R%[%033[0m%]%# '
\set PROMPT2 ''
-- histfile name
\set HISTFILE ~/.local/share/psql_history/psql_history- :DBNAME
-- don't record duplicates in histfile
\set HISTCONTROL ignoredups
-- save 5000 items in history
\set HISTSIZE 5000
-- print [null] instead of empty string when a value is null
\pset null [null]
-- autocomplete with uppercase
\set COMP_KEYWORD_CASE upper
-- pager setup
\set x '\\setenv PAGER less'
\set xx '\\setenv PAGER \'pspg -bX --no-mouse -s 7\''
:xx
\set lock_timeout 2
-- restore printing stuff
\unset QUIET