<p>Let’s walk through my short psqlrc(5) to see what I’ve set, and to inspire you
to find your own configuration that fits into your workflow. Here is my
complete psqlrc:</p>

<pre><code>\set ON_ERROR_ROLLBACK interactive
\set COMP_KEYWORD_CASE upper
\set HISTFILE …</code></pre>

Read more at the source