Using Postgres on command line
Learn how to be productive in psql, Postgres command line interface.
Postgres has a nice utility to work with database. You can modify the default behavior in your ~/.psqlrc file.
-- By default NULL displays an invisible character on the string. -- Make it say "[NULL]" \pset null '[NULL]' -- Ignore duplicated rows in the history log \set HISTCONTROL ignoredups -- Autocomplete keywords in uppercase (SELECT, WHERE, ...) \set COMP_KEYWORD_CASE upper -- Shows how much time it took to run the last query \timing -- Formats the results of the query according to the width of your screen. \x auto'