It's off by default for compatibility, but makes much more readable tabular output. I wrote this back in 2009 for 9.0, but not many people are aware of its existence (at least, I see plenty of ASCII output, and only occasional use of unicode in public writing).
Re:Customizing My Postgres Shell
by yangyang on Sunday July 16, 2017 @03:04PM
(#14783599)
This is cool. Always worth spending some time setting up psql.
In my psqlrc I also have a bunch of "macros" (unfortunately no parameters in psql) for common stuff like transaction handling and SET ROLE / RESET ROLE, lock monitoring etc.: https://github.com/hollobon/psqlrc/blob/master/psqlrc.conf
Some of it only works on <=9.4.
In my psqlrc I also have a bunch of "macros" (unfortunately no parameters in psql) for common stuff like transaction handling and SET ROLE / RESET ROLE, lock monitoring etc.: https://github.com/hollobon/psqlrc/blob/master/psqlrc.conf Some of it only works on <=9.4.
https://www.pgcli.com
All these years I didn't know about this.
\set PROMPT1 '%[%033[1m%][%/]%033[0m%]% # '