-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.psqlrc
34 lines (29 loc) · 1.1 KB
/
.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
-- Official docs: http://www.postgresql.org/docs/9.3/static/app-psql.html
-- Unofficial docs: http://robots.thoughtbot.com/improving-the-command-line-postgres-experience
-- Don't display the "helpful" message on startup.
\set QUIET 1
\pset null '[NULL]'
-- 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 > '
-- \setenv PAGER 'less -S'
\setenv PAGER 'pspg -X -b'
-- Show how long each query takes to execute
\timing
-- Use best available output format
\x auto
\set VERBOSITY verbose
\set HISTFILE ~/.psql_history- :DBNAME
\set HISTCONTROL ignoredups
\set COMP_KEYWORD_CASE upper
\unset quiet
-- Nicely formatted tables.
\pset linestyle unicode
-- Border around tables
\pset border 2
-- Don't store duplicates in history
\set HISTCONTROL ignoredups
\echo 🧐 🐘 postgres_dba 6.0 installed. Use ":dba" to see menu
\set dba '\\i /home/minimul/oss/postgres_dba/start.psql'