I'm facing a issue while importing the dump in my system, i'm getting the error as

" Error: syntax error at or near "" LOCK TABLESDB_NAME` WRITE;"

and exiting with "out of memory"

We had taken back-up from Suse linux and trying to import in Cent OS 6.3.

Any suggestion to fix this issue.

Thanks in Advance,

migrated from stackoverflow.com Apr 11 '13 at 9:38

This question came from our site for professional and enthusiast programmers.

  • Are you using a command like psql dbname < dumpfile.sql to do the import? – Dondi Michael Stroma Apr 11 '13 at 5:58
  • Yes i'm using that command to import. – Boopaathy Apr 11 '13 at 6:01

LOCK TABLES dname WRITE is not a valid PostgreSQL statement. It's a MySQL statement. You can't just take a MySQL dump and restore it to Postgres. You'll need to convert it either manually or find some kind of converter script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy