-
Notifications
You must be signed in to change notification settings - Fork 1
/
psqlrc
43 lines (31 loc) · 1.25 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
35
36
37
38
39
40
41
42
\set QUIET 1
\set PROMPT1 '%M %n@%/ [%R %# %x] '
\set PROMPT2 '%/ [%R %# %x] '
/* When querying a PostgreSQL database null values return a blank.
If instead you want it to return the value NULL you can edit the null option. */
\pset null '[null]'
/* To complete SQL keywords such as "SELECT" and "FROM" as either uppercase or lowercase,
you can set the COMPKEYWORDCASE option with the options upper or lower. */
\set COMP_KEYWORD_CASE upper
/* To have all queries display query times using enable the timing option. */
\timing
/* Increase history */
\set HISTSIZE 2000
/* When querying large tables sometimes the output renders text that is difficult to read.
You can switch to expanded table format. */
/* \x auto */
/* You can also set verbosity of error reports with options "default",
"verbose", or "terse" */
\set VERBOSITY verbose
/* Configuration for pspg */
/* https://github.com/okbob/pspg */
\setenv PAGER 'pspg -s 17'
\pset border 2
\pset linestyle unicode
\set QUIET 0
\echo 'Welcome to PostgreSQL! \n'
\echo 'Type :version to see the PostgreSQL version. \n'
\echo 'Type :extensions to see the available extensions. \n'
\echo 'Type \\q to exit. \n'
\set version 'SELECT version();'
\set extensions 'select * from pg_available_extensions;'