3 This plugin adds some aliases for useful Postgres commands.
5 :warning: this plugin works exclusively with Postgres installed via Homebrew on OSX
6 because Postgres paths are hardcoded to `/usr/local/var/postgres`.
8 To use it, add `postgres` to the plugins array in your zshrc file:
11 plugins=(... postgres)
16 | Alias | Command | Description |
17 |-------------|---------------------------------------------------------------------------------|-------------------------------------------------------------|
18 | startpost | `pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start` | Start postgres server |
19 | stoppost | `pg_ctl -D /usr/local/var/postgres stop -s -m fast` | Stop postgres server |
20 | restartpost | `stoppost && sleep 1 && startpost` | Restart (calls stop, then start) |
21 | reloadpost | `pg_ctl reload -D /usr/local/var/postgres -s` | Reload postgres configuration (some setting require restart)|
22 | statuspost | `pg_ctl status -D /usr/local/var/postgres -s` | Check startus of postgres server (running, stopped) |