Postgresql db restoring from dump fails
Solution 1:
Have you tried passing the file using the -f
flag instead of redirecting the input? Perhaps your console's redirection is acting weird:
psql -U user -f db.sql
Considering it's on Windows, I wouldn't be surprised if this was the case.
Solution 2:
You shouldn't have any trouble with characters-if they were exported successfully they should import fine. Is it possible you need the schema from the old database server as well?
If you look in the dump file can you find the line that its choking on? Is there anything odd there?
Solution 3:
I could not restore from .sql dump (got the same error) because my dump was not correctly completed (errors arose when I generated the dump, but somehow I didn't notice them). So always double-check if you have a valid dump file!