简体   繁体   English

无法将.sql导入PostgreSQL。 语法错误

[英]Cannot import .sql to PostgreSQL. Syntax error

Probably a very simple error but I cannot work it out for the life of me. 可能是一个非常简单的错误,但我无法终生解决。 Basically, I am loading a .sql dump into a postgres DB using 基本上,我正在使用.sql转储加载到postgres数据库中

psql testdb< C:\Users\Callum\Desktop\backup.sql

However, I get the error: 但是,我得到了错误:

ERROR:  syntax error at or near "`"
LINE 1: DROP TABLE IF EXISTS `table1`;
                             ^
ERROR:  syntax error at or near "`"
LINE 1: CREATE TABLE `table2` (
                     ^
ERROR:  syntax error at or near "`"
LINE 1: LOCK TABLES `table3` WRITE;

I have been trying to work this out for days and could not find any anwsers online. 我已经尝试了好几天了,却无法在线找到任何答案。

Thanks 谢谢

Are you importing from MySQL? 您要从MySQL导入吗? You don't need backticks here, you can take them out. 您在这里不需要反引号,可以将其取出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM