PostgreSQL on Windows
Download the Windows zip from EnterpriseDB site and unzip to some directory. For this demonstration, I'll assume C:\_apps\pgsql.
C:\>cd \_apps\pgsql
Initialize a new database. This location could be anywhere you like, for simplicity's sake I'll create a directory named data inside the pgsql directory.
C:\_apps\pgsql>mkdir data C:\_apps\pgsql>bin\initdb.exe -D data
After a series of debug messages you should finally receive the following.
WARNING: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the -A option the next time you run initdb. Success. You can now start the database server using: "bin\postgres" -D "data" or "bin\pg_ctl" -D "data" -l logfile start