0

I'm following the tutorial of loading a dvdrental database as shown in the link below: http://www.postgresqltutorial.com/load-postgresql-sample-database/

I have done the first step successfully but when I came to the step 2 and 3 which navigating the bin folder and loading the data I was stuck. It keeps prompt me with the invalid command message as shown in the picture below.

enter image description here

Anyone know how to solve this issue? Thanks in advance for all the help!

1

3 Answers 3

1

You should be running pg_restore from the shell, not from inside psql. pg_restore is a separate command line program, not a psql command.

Sign up to request clarification or add additional context in comments.

8 Comments

what meant..hmm..means that how should I type in the command window
You're still inside psql prompt when you type pg_restore -U ..., you need to run that from a normal command line prompt.
hmm how can I run it from a normal command line prompt...sorry I'm totally new to this software
Open a terminal window or console or cmd.exe window and type the pg_restore command from there.
I dont know what "invalid command" means or who is saying that. Start by opening a plain old command prompt and then fix your PATH environment variable or use the full path to pg_restore.
|
0

yes i have one solution check the your file path and before that extract the file.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
0

Just type exit.

Your are actually inside psql server and are executing command you should execute on windows.

Typing exit will close the psql connection and put you back on the windows terminal

Comments

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.