aboutsummaryrefslogtreecommitdiff
path: root/files/.psqlrc
diff options
context:
space:
mode:
authorAnton Bobov <abobov@gmail.com>2020-02-08 23:23:28 +0500
committerAnton Bobov <abobov@gmail.com>2020-02-08 23:39:36 +0500
commit89d08f8344c521977d027e2c2831540f72674915 (patch)
tree886574361601a214b7970985c47ddd298f0fc0bf /files/.psqlrc
parent090b5e21fe47e6102d21a1a39612953f8c643bba (diff)
Updates.
Diffstat (limited to 'files/.psqlrc')
-rw-r--r--files/.psqlrc23
1 files changed, 23 insertions, 0 deletions
diff --git a/files/.psqlrc b/files/.psqlrc
new file mode 100644
index 0000000..8d3e0ad
--- /dev/null
+++ b/files/.psqlrc
@@ -0,0 +1,23 @@
+-- Official docs: http://www.postgresql.org/docs/current/static/app-psql.html
+-- Unofficial docs: http://robots.thoughtbot.com/improving-the-command-line-postgres-experience
+
+\set QUIET 1
+
+\pset null '[NULL]'
+\pset border 2
+
+\set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# '
+\set PROMPT2 '[more] %R > '
+
+-- Show how long each query takes to execute
+\timing
+
+-- Use best available output format
+\x auto
+-- Maintain a separate history for each database.
+\set HISTFILE ~/.psql_history- :DBNAME
+\set HISTCONTROL ignoreboth
+
+\unset QUIET
+
+-- vim: ft=sql :