How to import an sql file of the northwind database to PostgreSQL?

落爺英雄遲暮 提交于 2019-12-11 06:05:31

问题


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.



来源:https://stackoverflow.com/questions/45701877/how-to-import-an-sql-file-of-the-northwind-database-to-postgresql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!