Error in creating SEQUENCEs when restoring the PostgreSQL database

孤者浪人 提交于 2019-12-01 03:28:12

You are trying to restore a dump from a v10 database into an older version of PostgreSQL (CREATE SEQUENCE ... AS is new in v10).

That is not supported and won't work. You can create an SQL script with pg_restore and edit it manually. Or upgrade the destination database.

Francisco

I have taken these notes:

SUPPORT ALL COMPRESSED DATABASE

pg_dump -U {usuario} -h {host} -W {database} | gzip -c > archivo.gz

RESTORE FROM BACK GZIP

gunzip -c {archivo.gz} | psql -h {host} -U postgres {database}

RESTORE FROM GZIP BACKUP FROM v10 to v9.x

gunzip -c {archivo.gz} | sed -e '/AS integer/d' | psql -U postgres -h {host} -W {database}

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