Skip to content

Instantly share code, notes, and snippets.

@martinusso
Created June 8, 2021 11:32
Show Gist options
  • Save martinusso/1061845685762fb880a0d5ed509c2cb7 to your computer and use it in GitHub Desktop.
Save martinusso/1061845685762fb880a0d5ed509c2cb7 to your computer and use it in GitHub Desktop.
Postgres

==> postgresql@12 This formula has created a default database cluster with: initdb --locale=C -E UTF-8 /usr/local/var/postgresql@12 For more details, read: https://www.postgresql.org/docs/12/app-initdb.html

postgresql@12 is keg-only, which means it was not symlinked into /usr/local, because this is an alternate version of another formula.

If you need to have postgresql@12 first in your PATH, run: echo 'export PATH="/usr/local/opt/postgresql@12/bin:$PATH"' >> ~/.zshrc

For compilers to find postgresql@12 you may need to set: export LDFLAGS="-L/usr/local/opt/postgresql@12/lib" export CPPFLAGS="-I/usr/local/opt/postgresql@12/include"

For pkg-config to find postgresql@12 you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/postgresql@12/lib/pkgconfig"

To have launchd start postgresql@12 now and restart at login: brew services start postgresql@12 Or, if you don't want/need a background service you can just run: pg_ctl -D /usr/local/var/postgresql@12 start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment