Three useful psql settings
- By default psqldoesn't displayNULLs, but you can configure it to show NULLs as a printable character or string e.g:\pset null '█'or\pset null '(null)'. This makes it is easier to distinguishNULLfrom empty string.
- 
\timing onappends an execution time to each result e.g:Time: 0.412 ms.\timing offturns it off.
- By default, psqlstores every line in history. Setting\set HISTCONTROL ignoredupsignores lines which match the previous history line. This is a common default for shells and REPLs.
These can be used on an ad-hoc basis or added to .psqlrc.