From d95ee01aa87d8e0837e91cccb8b25817c4b14817 Mon Sep 17 00:00:00 2001 From: patrick nsukami Date: Sun, 31 Jul 2016 17:41:55 +0000 Subject: [PATCH 1/1] add psqlrc example file --- .psqlrc | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .psqlrc diff --git a/.psqlrc b/.psqlrc new file mode 100644 index 0000000..6c82453 --- /dev/null +++ b/.psqlrc @@ -0,0 +1,42 @@ +-- See http://www.postgresql.org/docs/9.6/static/app-psql.html for the list of other useful variables + +-- Be quiet during loading of this file +\set ECHO none +-- set client_min_messages = fatal; + +-- makes running script stop on the 1st error +-- \set ON_ERROR_STOP 1 + +-- display null values as [null], instead of blank +\pset null '[null]' + +\set COMP_KEYWORD_CASE upper + +-- one history file per database +\set HISTFILE ~/.psql_history- :DBNAME +\set HISTSIZE 2000 + +-- have all queries display query times +\timing + +-- prompt customization +\set PROMPT1 '%[%033[31;5m%]%x%[%033[0m%]%[%033[31;1m%]%n%[%033[33;1m%]@%[%033[32;1m%m%[%033[0m%] %[%033[37;1m%]%/%[%033[0m%] %`date +"%H:%M:%S"` %#' +\set PROMPT2 '[more] %R > ' + +-- Verbose error reports. +\set VERBOSITY verbose + +-- unicode +\encoding unicode + +-- switch to expanded table format for large results +\x auto + +-- custom shortcuts +\set settings 'select name, setting,unit,context from pg_settings;' + + +-- Okay, be noisy again +-- set client_min_messages = warning; +-- When running scripts, echos all commmands to stdout. +\set ECHO all \ No newline at end of file -- 2.17.1