Today I Learned

hashrocket A Hashrocket project

Use A psqlrc File For Common Settings

There are a handful of settings that I inevitably turn on or configure each time I open up a psql session. I can save myself a little time and sanity by configuring these things in a .psqlrc dotfile that is located in my home directory. This will ensure my psql session is configured just how I like it each time I launch it. Here is what my ~/.psqlrc file currently looks like:

\x auto
\pset null 'Ø'
See More #sql TILs
Looking for help? Hashrocket developers believe that data quality is as important as code quality. We enjoy all the challenges of relational databases, from finding the fastest index, to structuring data to fit the needs of an application. We're eager to share our experiences; check out PG Casts, our series of free PostgreSQL screencasts.