Error restoring database in Postgresql

情到浓时终转凉″ 提交于 2019-12-24 08:39:59

问题


I have taken a backup of database using pgAdmin of a postgresql DB. I am trying to restore it on to an another system using

D:\OB_dependencies\DB_Backup>psql -U postgres OpenBravo < OBPOS_DB_BACKUP_23MAY_2013

Some of the tables are created, but script stops with a error

ERROR:  literal carriage return found in data
HINT:  Use "\r" to represent carriage return.
CONTEXT:  COPY ad_session_usage_audit, line 2355

Please suggest me a solutions for this issue. Thanks!!!


回答1:


From postgreSQL mailing list it is stated that:

I'd only expect this if an old pg_dumpall was being used

It occurs, when dealing with a version so old that the behavior of COPY itself was different.

One possible workaround is to use the --inserts option of pg_dump. That will mean slower dump and restore, though.

refer here .

Also worth referring here.



来源:https://stackoverflow.com/questions/16709568/error-restoring-database-in-postgresql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!