Use .psqlrc
to set defaults.
For the specific case of \x
, newer psql
versions (9.3, I think, but it might just be the 9.4 pre-release) can automatically switch to expanded output mode when the rows are too wide to fit on a line. From \?
:
\x [on|off|auto] toggle expanded output (currently off)
So I suggest putting \x auto
in your .psqlrc
, rather than forcing it to on
.