How can I start PostgreSQL on Windows?

后端 未结 8 874
一生所求
一生所求 2020-11-29 18:24

I have installed Postgresql on my Windows 10 PC. I have used the pgAdmin II tool to create a database called company, and now I want to start the database server running. I

8条回答
  •  臣服心动
    2020-11-29 19:02

    pg_ctl is a command line (Windows) program not a SQL statement. You need to do that from a cmd.exe. Or use net start postgresql-9.5


    If you have installed Postgres through the installer, you should start the Windows service instead of running pg_ctl manually, e.g. using:

    net start postgresql-9.5
    

    Note that the name of the service might be different in your installation. Another option is to start the service through the Windows control panel


    I have used the pgAdmin II tool to create a database called company

    Which means that Postgres is already running, so I don't understand why you think you need to do that again. Especially because the installer typically sets the service to start automatically when Windows is started.


    The reason you are not seeing any result is that psql requires every SQL command to be terminated with ; in your case it's simply waiting for you to finish the statement.

    See here for more details: In psql, why do some commands have no effect?

提交回复
热议问题