To need restore database using sql file we need to execute , run the sql file with the help of cmd.
open postgres
create database.
open cmd
move to the bin folder of postgres
cd C:\Program Files\PostgreSQL\9.1\bin
then execte the command
C:\Program Files\PostgreSQL\9.1\bin>psql -U postgres -d usda -a -f C:\Users\gurjeet\Desktop\usda.sql
open postgres
create database.
open cmd
move to the bin folder of postgres
cd C:\Program Files\PostgreSQL\9.1\bin
then execte the command
C:\Program Files\PostgreSQL\9.1\bin>psql -U postgres -d usda -a -f C:\Users\gurjeet\Desktop\usda.sql