如何将northwind数据库的sql文件导入PostgreSQL? [英] How to import an sql file of the northwind database to PostgreSQL?
问题描述
我正在使用最新版本的PostgreSQL和Pgadmin 4.
我正在尝试从git导入这个数据库: https://github.com/pthom/northwind_psql
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
我试图将sql文件作为恢复加载,并收到此消息错误:
I attempted to load the sql file as a restore, and recieved this error:
推荐答案
此文件不适用于pg_restore。您应该只在psql上执行它。
This file is not intended for a pg_restore. You should to just execute it on psql.
pg_restore是一个实用程序,用于从pg_dump在其中一个存档中创建的存档中恢复PostgreSQL数据库。非纯文本格式。
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.
在GitHub上查看 create_db
shell脚本,了解如何导入它。
Take a look to create_db
on GitHub shell script to understand how to import it.
这篇关于如何将northwind数据库的sql文件导入PostgreSQL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!