How to import an sql file of the northwind databas

2019-08-04 08:16发布

问题:

I am using the most recent version of PostgreSQL, and Pgadmin 4. And I am attempting to import this database from git: https://github.com/pthom/northwind_psql

I attempted to load the sql file as a restore, and recieved this error:

回答1:

This file is not intended for a pg_restore. You should to just execute it on psql.

pg_restore is a utility for restoring a PostgreSQL database from an archive created by pg_dump in one of the non-plain-text formats.

Take a look to create_db on GitHub shell script to understand how to import it.