HomeToolsAbout

Installation

Installation

# link psql manually using Brew ## when psql is installed but not detected in cli brew link postgresql@15 # check psql version postgres -V # configure `PATH` for psql15 echo 'export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH"' >> ~/.zshrc

Console Commands

# connect to db directly from cli psql postgresql://<db_name>:<db_pw>@localhost:<port_num>/<db_env_name> # run psql cli in terminal psql -U postgres psql postgres # show running postgres pgrep -l postgres # list tables \d # find local port and users \conninfo

Brew

# start psql using brew brew services start postgresql # restart brew services restart postgresql@14 # stop brew services stop postgresql@14
AboutContact