3

I have postgres installed.How to open postgres command Line? When i open command prompt, i have

Microsoft Windows [Version 10.0.17134.590]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\dhanr>

How to navigate to postgres command Line, as my final goal is to run pg_dump dbname > outfile command.

1
  • You need to have postgres executable on your Path. Commented Feb 23, 2019 at 5:56

2 Answers 2

7

You should use psql command-line tool.

You can find psql at your installation directory. Example;

C:\Program Files\PostgreSQL\10\bin\psql.exe
Sign up to request clarification or add additional context in comments.

Comments

1

Go inside bin folder in C drive where Postgres is installed. run following command in git bash or Command prompt: pg_ctl.exe restart -D "" Ex: pg_ctl.exe restart -D "C:\Program Files\PostgreSQL\9.6\data"

Another way: type "services.msc" in run popup(windows + R). This will show all services running Select Postgres service from list and click on start/stop/restart.

1 Comment

Thanks for you answer.It will restart the service.. I was looking for command Line

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.