diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2018-10-09 14:46:47 -0400 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2018-10-09 14:46:47 -0400 |
commit | 075160b86c64045e661209ad7906559068b44104 (patch) | |
tree | a910a6eef6163d39859395bb0b416b2b184db9ac /plugins/postgres/README.md | |
parent | 5ece6ef2f07c58672a9c965dbbbb62a42386fb2d (diff) | |
parent | 3c9942c4884089b290ef750468b29419ca0de271 (diff) | |
download | zsh-075160b86c64045e661209ad7906559068b44104.tar.gz zsh-075160b86c64045e661209ad7906559068b44104.tar.bz2 zsh-075160b86c64045e661209ad7906559068b44104.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/postgres/README.md')
-rw-r--r-- | plugins/postgres/README.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/postgres/README.md b/plugins/postgres/README.md new file mode 100644 index 000000000..59445f31c --- /dev/null +++ b/plugins/postgres/README.md @@ -0,0 +1,22 @@ +# Postgres plugin + +This plugin adds some aliases for useful Postgres commands. + +:warning: this plugin works exclusively with Postgres installed via Homebrew on OSX +because Postgres paths are hardcoded to `/usr/local/var/postgres`. + +To use it, add `postgres` to the plugins array in your zshrc file: + +```zsh +plugins=(... postgres) +``` + +## Aliases + +| Alias | Command | Description | +|-------------|---------------------------------------------------------------------------------|-------------------------------------------------------------| +| startpost | `pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start` | Start postgres server | +| stoppost | `pg_ctl -D /usr/local/var/postgres stop -s -m fast` | Stop postgres server | +| restartpost | `stoppost && sleep 1 && startpost` | Restart (calls stop, then start) | +| reloadpost | `pg_ctl reload -D /usr/local/var/postgres -s` | Reload postgres configuration (some setting require restart)| +| statuspost | `pg_ctl status -D /usr/local/var/postgres -s` | Check startus of postgres server (running, stopped) | |