1 , to ensure that PostgreSQL database is correctly installed, pay attention to the same port number can not
My installation directory as shown:
Version 9.6 which port number is the port number for the version of 5432,10 5433,11 version of the port number is 5434. Without knowing the port number, PostgreSQL can be installed in the directory \ data \ postgresql.conf file view, as shown:
2 , using the Run as Administrator cmd, respectively, into the PostgreSQL installation directory \ command in the bin
The command format is: pg_ctl.exe register -N "PostgreSQL" -D PostgreSQL installation directory \ data.
-D attention back catalog, there must be an absolute path. I as follows:
pg_ctl.exe register -N "PostgreSQL9" -D D:\Database\PostgreSQL\9.6\data
pg_ctl.exe register -N "PostgreSQL10" -D D:\Database\PostgreSQL\10\data
pg_ctl.exe register -N "PostgreSQL11" -D D:\Database\PostgreSQL\11\data
3 , after successful registration service, you can view
Figure: