I have exported database with phpPgAdmin tool – format sql, structure and data.
When I try to import this sql using:
psql command \i filename.sql
After some time (file is 2GB) I get following error:
ERROR: unterminated quoted string at or near ".. , '\x25504… "
with "arrow" pointing to \x.
Looks like \ is making a problem here…
Best Answer
Looking at this tutorial, seems like
phpPgAdmin
make a call forpg_dump
to export the data.To process plain files with
psql
, you must use the-f
option, eg:I strongly recommend using
pg_dump
manually with the option--format=custom
to make the restore more flexible (and use the toolpg_restore
).Please, take a look at this URL to restore de file using
phpPgAdmin
itself: