1

I've inherited a Django/Wagtail CMS and trying to set up the site locally on my mac. I've run pg_dump and when I run the export in Postico (via Load Query) it returns a Syntax error on this line;

COPY auth_group (id, name) FROM stdin;
1   Moderators
2   Editors
\.

This is the error

ERROR:  syntax error at or near "1"
LINE 1355: 1 Moderators

There are several more blocks that have a similar format further down.

Is this a problem with the way I exported it or do I need to do something different with the way I import it?

1
  • Do you get a similar error when you try to import the dump file using psql? Commented Jun 21, 2016 at 17:11

1 Answer 1

1

My bad, didn't realise that the export from pg_dump isn't an SQL statement. I managed to get the database in via

psql -u username -d databasename -f pathtofile

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

Comments

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.