When I start a psql session, I would like certain meta commands to already be set.
\x auto \set ON_ERROR_STOP on
I was hoping to find an rc or config file but couldn't. The command line options don't seem comprehensive either.
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.Sign up to join this community
You are looking for the
.psqlrc file. Per documentation:
Unless it is passed an
-coption, psql attempts to read and execute commands from the system-wide startup file (
psqlrc) and then the user's personal startup file (
~/.psqlrc), after connecting to the database but before accepting normal commands. These files can be used to set up the client and/or the server to taste, typically with