Skip to content

Commit

Permalink
tweaks on postgresql config
Browse files Browse the repository at this point in the history
  • Loading branch information
rwoeber committed Jan 1, 2015
1 parent 93a266e commit 3123905
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions tag-postgresql/psqlrc
@@ -1,23 +1,35 @@
-- Don't display the "helpful" message on startup.
\set QUIET 1
\pset null '[NULL]'

-- http://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-PROMPTING
\set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# '
-- PROMPT2 is printed when the prompt expects more input, like when you type
-- SELECT * FROM<enter>. %R shows what type of input it expects.
\set PROMPT2 '[more] %R > '

-- Use table format (with headers across the top) by default, but switch to expanded table format when there's a lot of data, which makes it much easier to read.
\x auto

-- Use unicode characters and table frame to draw tables
\pset linestyle unicode
\pset border 2

-- Show how long each query takes to execute
\timing

-- Show NULL values as special Unicode symbol, that is unlikely to show up in any text stored in the DB
\pset null ¤

-- Wrap long lines to fit their column widths
\pset format wrapped

-- Use best available output format
\x auto
\set VERBOSITY verbose
\set HISTFILE ~/.psql_history- :DBNAME
\set HISTCONTROL ignoredups

-- Autocomplete keywords (like SELECT) in upper-case, even if you started typing them in lower case.
\set COMP_KEYWORD_CASE upper

\unset QUIET
\set VERBOSITY verbose

-- if psql can't check for a file's existence, provide an empty local
-- file that users can override with their custom dotfiles.
Expand Down

0 comments on commit 3123905

Please sign in to comment.