Psqlrc
From PostgreSQL wiki
Jump to navigationJump to searchpsqlrc is the configuration file read by the [psql client]. psql will typically read both a systemwide psqlrc and the per-user one (in ~/.psqlrc on unix-ish systems)
It allows a lot of customization of psql, including defining macros to implement new commands.
TODO: Needs curation. This is a work in progress, collecting existing examples of psqlrc configuration, in the hope someone will go through and pull out some interesting snippets, and maybe a kitchen sink psqlrc that has all the good bits in it.
Articles
- https://robots.thoughtbot.com/an-explained-psqlrc
- https://www.digitalocean.com/community/tutorials/how-to-customize-the-postgresql-prompt-with-psqlrc-on-ubuntu-14-04
- https://opensourcedbms.com/dbms/psqlrc-psql-startup-file-for-postgres/
- https://www.if-not-true-then-false.com/2009/postgresql-psql-psqlrc-tips-and-tricks/
- https://www.citusdata.com/blog/2017/07/16/customizing-my-postgres-shell-using-psqlrc/
- http://pavdmyt.com/better-postgresql-cli-experience-with-psqlrc-tweaks/
- http://www.craigkerstiens.com/2013/02/21/more-out-of-psql/
- http://merlinmoncure.blogspot.com/2012/09/psql-now-with-splash-of-color.html
- http://i-dba.blogspot.com/2014/02/colorizing-psql-prompt-guide.html
- https://simply.name/yet-another-psql-color-prompt.html
- https://www.periscopedata.com/blog/optimizing-your-psql.html
- https://www.depesz.com/2008/05/18/silencing-commands-in-psqlrc/
- https://www.commandprompt.com/blog/psql_tip_change_history_location/