News for hackers. Stuff that matters.
Re:Customizing My Postgres Shell by rleigh on Sunday July 16, 2017 @04:51PM (#14784067)
The article doesn't mention enabling unicode output.

    \pset linestyle unicode
and other related formatting options. Some examples here:

    http://postgres.cz/wiki/Pretty_borders_in_psql
    http://okbob.blogspot.co.uk/2014/10/styles-for-unicode-borders-are-merged.html
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.

Re:Customizing My Postgres Shell by Cieplak on Sunday July 16, 2017 @04:08PM (#14783897)
Also, check out pgcli:

https://www.pgcli.com

Re:Customizing My Postgres Shell by mpd on Monday July 17, 2017 @12:51AM (#14785760)
I used pgcli for awhile, but really missed being able to set \x auto. I do like the tab completion quite a bit.
Re:Customizing My Postgres Shell by Symbiote on Sunday July 16, 2017 @04:11PM (#14783908)
Useful, though I choose:

    \pset null ␀
i.e. U+2400 SYMBOL FOR NULL as my null symbol.
Re:Customizing My Postgres Shell by emilsedgh on Sunday July 16, 2017 @07:13PM (#14784595)
\x auto

All these years I didn't know about this.

Re:Customizing My Postgres Shell by sourcesmith on Monday July 17, 2017 @05:12AM (#14786782)
The prompt 1 setting in the article emboldens everything and leaves you terminal with the bolded setting on exit as it is missing a '%' It should be:

\set PROMPT1 '%[%033[1m%][%/]%033[0m%]% # '