1

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

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

1 Answer 1

3

Are you importing from MySQL? You don't need backticks here, you can take them out.

Sign up to request clarification or add additional context in comments.

1 Comment

It could potentially be an mySQL database but I was delivered a SchemaSpy report stating that it was a postgresSQL db. I will give mySQL a try in that case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.