Download from postgresql.org
Run the installer (accept defaults)
Remember your postgres password
Verify installation via terminal:
psql --version
You should see something like "psql (PostgreSQL) 15.4"
3. Create your database and connect
Open Terminal (and with postgres running):
psql postgres -c "CREATE DATABASE my_first_db;"
Now connect in VSCode:
Open Command Palette (Cmd+Shift+P) → "SQLTools: Add New Connection"
Fill in:
- Connection name: Local PostgreSQL
- Server/Host: localhost
- Port: 5432
- Database: my_first_db
- Username: postgres (or your Mac username)
- Password: (leave blank if using Homebrew, or what you set during install)
Click "Test Connection" → "Save Connection"
You'll see a database icon in your sidebar.
4. Write your first table
Right-click your connection → "New SQL File"
Copy the code below.
Highlight all text → Right-click → "Run on Active Connection"
You should see your 3 rows returned.
SQL knowledge without practical setup skills is like knowing how to drive but never getting behind the wheel.
Get comfortable with real databases.
That's what separates tutorial followers from hireable data professionals.
I hope you've found this thread helpful.
If you did, I ask for 2 small favours:
1. Follow me @imtommitchell for more like this daily.
2. Click below, jump to the top and share to help someone else.