I have a SQL dump file: C:\Users\Rayyan\Desktop\dump_2.sql.

I have been trying to import this for so long. I am using pgadmin 4, and since I could find nothing in that GUI to help, I tried using Windows command prompt.

I created my new database "wecudos" in pgadmin4.

Then tried the following command in windows command prompt:

psql wecudos < C:\Users\Rayyan\Desktop\dump_2.sql

according to the specified format:

psql dbname < dumpfile

This is not working, please help, I have also added a screenshot of the error/data I entered, thanks!

enter image description here

  • Do you know exactly how this dump file was created? "pg_dump", "pg_dumpall", or something else? And what options were used?
    – jjanes
    Nov 27, 2018 at 16:47

1 Answer 1


try this

C:\Program Files\PostgreSQL\9.6\bin>psql -U postgres dbname < D:\testdump.sql


C:\Program Files\PostgreSQL\9.4\bin>psql -U postgres dbname < D:\testdump.sql
  • I edited check now
    – Schüler
    Nov 27, 2018 at 11:28

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.