-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathpsqlrc
More file actions
34 lines (24 loc) · 924 Bytes
/
Copy pathpsqlrc
File metadata and controls
34 lines (24 loc) · 924 Bytes
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
-- Define prompt in the format [hostname] username@dbname
\set PROMPT1 '%[%033[1m%][%M] %n@%/%R%[%033[0m%]%# '
\set PROMPT2 '[more] %R > '
-- Autocompletion of keywords in lowercase
\set COMP_KEYWORD_CASE lower
-- Keep a separate history file for each database
\set HISTFILE ~/.psql/history-:DBNAME
-- Display query times in psql shell
\timing
-- Automatically use expanded table output based on terminal width
\x auto
-- Set special char for null values
\pset null '◇'
-- Terminate scripts on the first error
\set ON_ERROR_STOP on
-- Rollback to the last successful command when an error occurs, allows you
-- to interactively correct a failed command
\set ON_ERROR_ROLLBACK interactive
-- Use vim key bindings
\set keymap vi-command
-- Use new unicode line drawing characters
\pset linestyle 'unicode'
-- Use more human readable format for printing of interval values
\set intervalstyle to 'postgres_verbose';