Skip to content

Instantly share code, notes, and snippets.

@woosal1337
Created July 17, 2023 10:01
Show Gist options
  • Save woosal1337/56b5a3a55386fc8ac62b70d87cd6aa50 to your computer and use it in GitHub Desktop.
Save woosal1337/56b5a3a55386fc8ac62b70d87cd6aa50 to your computer and use it in GitHub Desktop.
PostgreSQL Mac Setup
If you need to have postgresql@15 first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH"' >> ~/.zshrc
For compilers to find postgresql@15 you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/postgresql@15/lib"
export CPPFLAGS="-I/opt/homebrew/opt/postgresql@15/include"
To start postgresql@15 now and restart at login:
brew services start postgresql@15
Or, if you don't want/need a background service you can just run:
LC_ALL="C" /opt/homebrew/opt/postgresql@15/bin/postgres -D /opt/homebrew/var/postgresql@15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment