]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/postgres/README.md
initial
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / postgres / README.md
1 # Postgres plugin
2
3 This plugin adds some aliases for useful Postgres commands.
4
5 :warning: this plugin works exclusively with Postgres installed via Homebrew on OSX
6 because Postgres paths are hardcoded to `/usr/local/var/postgres`.
7
8 To use it, add `postgres` to the plugins array in your zshrc file:
9
10 ```zsh
11 plugins=(... postgres)
12 ```
13
14 ## Aliases
15
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)         |