Postgresql – importing-a-sql-db-dump-postgres11 pgadmin4

pg-dumppostgresql

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

Best Answer

try this

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

or

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