my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
1.4 KiB

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