-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.psqlrc
More file actions
49 lines (34 loc) · 1.18 KB
/
.psqlrc
File metadata and controls
49 lines (34 loc) · 1.18 KB
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
41
42
43
44
45
46
47
48
49
\set QUIET 1
-- Display how long commands take
\timing on
-- Expanded table format (on|off|auto)
\x auto
-- Verbose error reports.
\set VERBOSITY verbose
-- Autocomplete keywords (like SELECT) in UPPERCASE
\set COMP_KEYWORD_CASE upper
-- Show NULL values as [NULL]
\pset null '[NULL]'
-- Styles
\pset border 2
\pset linestyle unicode
\pset null '∅'
-- ===============================[ PROMPTS ]=============================== --
-- Example prompts
-- host user@db=# | '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# '
-- user@host/db=# | '%n@%M/%/%R%#%x '
-- user@host:port/db=# | '%n@%M:%>/%/%R%#%x '
-- host:port(version) user db=# | '%m:%>(%:pg_version:) %n %/ %x%# '
-- [more] - > | '[more] %R > '
-- Prompt1 for initial input
\set PROMPT1 '\033[1;32m%n@%M:%>\033[0m/\033[1;35m%/\033[0m%R%x%# '
-- Prompt2 when waiting for more input
\set PROMPT2 '[more] %R > '
-- ===============================[ HISTORY ]=============================== --
-- use per-database history files
\set HISTFILE ~/.psql_history- :DBNAME
-- history size limit
\set HISTSIZE 2000
-- ignore both ignoredups and ignorespace
\set HISTCONTROL ignoreboth
-- \unset QUIET