Difference between revisions of "Psqlrc"

From PostgreSQL wiki
Jump to: navigation, search
(Created page with "psqlrc is the configuration file read by the https://www.postgresql.org/docs/current/static/app-psql.html psql client. psql will typically read both a systemwide psqlrc an...")
 
 
Line 24: Line 24:
 
== Examples ==
 
== Examples ==
  
* https://bitbucket.org/adamkg/libakg/src/default/dot/psqlrc-commands.d/
+
* https://bitbucket.org/adamkg/libakg/src/default/dot (clever - check out [https://bitbucket.org/adamkg/libakg/src/default/dot/psqlrc psqlrc] and  [https://bitbucket.org/adamkg/libakg/src/default/dot/psqlrc-commands.d/update_psqlrc_commands.sh psqlrc-commands.d/update_psqlrc_commands.sh]
 
* https://github.com/e7e6/psqlrc/blob/master/psqlrc
 
* https://github.com/e7e6/psqlrc/blob/master/psqlrc
 
* https://github.com/aziz/dotfiles/blob/master/psqlrc
 
* https://github.com/aziz/dotfiles/blob/master/psqlrc

Latest revision as of 20:05, 24 August 2017

psqlrc 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


Examples

Useful Snippets

Useful psqlrc tricks