1 -- Postgresql client configuration file.
3 -- Copyright (C) 2016 Simon Ruderich
5 -- This file is free software: you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation, either version 3 of the License, or
8 -- (at your option) any later version.
10 -- This file is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
15 -- You should have received a copy of the GNU General Public License
16 -- along with this file. If not, see <http://www.gnu.org/licenses/>.
19 -- Shut up \pset during this config script.
22 -- Automatically switch to vertical mode when the columns don't fit on screen.
25 -- Use unicode characters for borders.
26 \pset linestyle unicode
28 -- Per default NULL values are not displayed, use a replacement string to
29 -- prevent mistaken them for an empty string.
32 -- Don't abort transactions in interactive mode when an error occurs. As the
33 -- error is displayed no information is lost and this saves one from having to
34 -- restart the transaction on a typo in a statement.
35 \set ON_ERROR_ROLLBACK interactive
37 -- "ignorespace ignoredups"
38 \set HISTCONTROL ignoreboth
39 -- Set path to history file (database specific) and increase it.
40 \set HISTFILE HISTFILE_PATH- :DBNAME
43 -- Add transaction status (%x) to prompt; show database name in bold green.
44 \set PROMPT1 '%x%[%033[01;32m%]%/%[%033[00m%]%R%# '
45 -- Remove database from second prompt to make it easily distinguishable from
47 \set PROMPT2 '%x%R%# '
49 -- But display the normal psql welcome message.