install postgresql mac homebrew code example Example 1: homebrew postgres brew install postgresql Example 2: postgres install mac $ brew install postgresql