Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 将sql转储导入postgres_Postgresql - Fatal编程技术网

Postgresql 将sql转储导入postgres

Postgresql 将sql转储导入postgres,postgresql,Postgresql,在ubuntu终端上运行此命令时: psql -h localhost -U arwinder --password -f sh_cake_db_14_02_13.sql -d new_db 其中,“arwinder”是用户名,“sh_cake_db_14_02_13.sql”是sql转储,“new_db”是数据库。 然后在导入时显示以下错误,并且在postgresql数据库中,我没有所有的表。这些是错误: invalid command \N invalid command \ invali

在ubuntu终端上运行此命令时:

psql -h localhost -U arwinder --password -f sh_cake_db_14_02_13.sql -d new_db
其中,“arwinder”是用户名,“sh_cake_db_14_02_13.sql”是sql转储,“new_db”是数据库。 然后在导入时显示以下错误,并且在postgresql数据库中,我没有所有的表。这些是错误:

invalid command \N
invalid command \
invalid command \
ERROR:  syntax error at or near "27"
LINE 1: 27 Balaji Angan

有一个转换工具,或者您可以参考postgressql的wiki,查看MySQL部分并检查您的数据类型。

请解释链接上的工具…哦,它不起作用。您可以试试这个。为什么您认为OP中的转储是MySQL转储?SQL转储中第1行的内容是什么?