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