77d70c9f99f7629b4718ad5931920fd0e4db2d4e

Author
Umberto Nicoletti <umberto.nicoletti@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

postgres: add README (#7217)

Diff

 1diff --git a/plugins/postgres/README.md b/plugins/postgres/README.md
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..59445f31cf15eff6959d546361905aeb5ddcce29
 4--- /dev/null
 5+++ b/plugins/postgres/README.md
 6@@ -0,0 +1,22 @@
 7+# Postgres plugin
 8+
 9+This plugin adds some aliases for useful Postgres commands.
10+
11+:warning: this plugin works exclusively with Postgres installed via Homebrew on OSX
12+because Postgres paths are hardcoded to `/usr/local/var/postgres`.
13+
14+To use it, add `postgres` to the plugins array in your zshrc file:
15+
16+```zsh
17+plugins=(... postgres)
18+```
19+
20+## Aliases
21+
22+| Alias       | Command                                                                         | Description                                                 |
23+|-------------|---------------------------------------------------------------------------------|-------------------------------------------------------------|
24+| startpost   | `pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start` | Start postgres server                                       |
25+| stoppost    | `pg_ctl -D /usr/local/var/postgres stop -s -m fast`                             | Stop postgres server                                        |
26+| restartpost | `stoppost && sleep 1 && startpost`                                              | Restart (calls stop, then start)                            |
27+| reloadpost  | `pg_ctl reload -D /usr/local/var/postgres -s`                                   | Reload postgres configuration (some setting require restart)|
28+| statuspost  | `pg_ctl status -D /usr/local/var/postgres -s`                                   | Check startus of postgres server (running, stopped)         |