-
Notifications
You must be signed in to change notification settings - Fork 1
/
.psqlrc
21 lines (14 loc) · 1.02 KB
/
.psqlrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
\set QUIET 1
\set PROMPT1 '%001%033[1;32m%002%n%001%033[m%002@%001%033[1;34m%002%/%R%001%033[m%002#%x '
\set PROMPT2 '%001%033[1;32m%002%n%001%033[m%002@%001%033[1;34m%002%/%R%001%033[m%002#%x '
\set COMP_KEYWORD_CASE upper
/* \set VERBOSITY verbose */
\set HISTCONTROL ignoredups
/* \x auto */
\pset null '<null>'
\set triggers 'SELECT event_object_table AS table_name ,trigger_name FROM information_schema.triggers GROUP BY table_name , trigger_name ORDER BY table_name ,trigger_name;'
\set indexes 'SELECT tablename, indexname, indexdef FROM pg_indexes WHERE schemaname = \'public\' ORDER BY tablename, indexname;'
\set sequences 'SELECT sequence_schema, sequence_name, start_value, increment FROM information_schema.sequences ORDER BY sequence_name;'
\set queries 'SELECT pid, now() - pg_stat_activity.query_start AS duration, query FROM pg_stat_activity WHERE state = \'active\';'
\set functions 'SELECT routine_name FROM information_schema.routines WHERE routine_type = \'FUNCTION\' AND routine_schema = \'public\';'
\unset QUIET