Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarek-przygodzki/5696ea6bf173e802894d6da6f365f16a to your computer and use it in GitHub Desktop.
Save jarek-przygodzki/5696ea6bf173e802894d6da6f365f16a to your computer and use it in GitHub Desktop.
Postgres on Windows without the installer
Download ZIP file from https://www.enterprisedb.com/download-postgresql-binaries
Unpack to any directory of your choosing (C:\bin\pgsql)
PS C:\bin\pgsql> $env:PGDATA = "C:\bin\pgsql\data"
PS C:\bin\pgsql> .\bin\initdb "--username=postgres"
# postgres.exe vs pg_ctl.exe: see https://www.postgresql.org/docs/current/server-start.html
PS C:\bin\pgsql> .\bin\postgres.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment