2
0

postgres.plugin.zsh 480 B

12345678910111213
  1. # Aliases to control Postgres
  2. # Paths noted below are for Postgres installed via Homebrew on OSX
  3. if (( ! $+commands[brew] )); then
  4. return
  5. fi
  6. local PG_BREW_DIR=$(brew --prefix)/var/postgres
  7. alias startpost="pg_ctl -D $PG_BREW_DIR -l $PG_BREW_DIR/server.log start"
  8. alias stoppost="pg_ctl -D $PG_BREW_DIR stop -s -m fast"
  9. alias restartpost="stoppost && sleep 1 && startpost"
  10. alias reloadpost="pg_ctl reload -D $PG_BREW_DIR -s"
  11. alias statuspost="pg_ctl status -D $PG_BREW_DIR -s"