-
Notifications
You must be signed in to change notification settings - Fork 2
/
dot_psqlrc
40 lines (29 loc) · 929 Bytes
/
dot_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
-- disable output temporarily
\set QUIET on
-- nicer rendering for null
\pset null '❌ '
-- nicer tables
\pset linestyle unicode
-- enable timers
\timing
-- disable default pager
\pset pager off
-- automatically switch to \x for large outputs
\x auto
-- nicer prompt
\set PROMPT1 '\npsql %[%033[0;33;32m%]%/%[%033[0m%] on %[%033[0;33;33m%]%M%[%033[0m%] as %[%033[0;33;35m%]%n%[%033[0m%] %[%033[0;33;36m%]%x%[%033[0m%]\n%R> '
\set PROMPT2 '%R> '
-- better errors
\set VERBOSITY verbose
-- keep inputs in the history once
\set HISTCONTROL ignoredups
-- always auto complete in lowercase
\set COMP_KEYWORD_CASE lower
-- output back on
\set QUIET off
--Alias
\set follower_req `cat ~/.psqlrc_alias/follower_rep.sql`
\set leader_rep `cat ~/.psqlrc_alias/leader_rep.sql`
\set locks `cat ~/.psqlrc_alias/locks.sql`
\set seq_scans `cat ~/.psqlrc_alias/seq_scans.sql`
\set index_status `cat ~/.psqlrc_alias/index_rate.sql`