我需要以某种方式将v10转储文件转换为兼容9.6的文件
谷歌的云SQL运行PostgreSQL 9.6版,而我的数据库自创建以来一直运行在10版上。
问题
:尝试将数据库导入云SQL时,我得到
an unknown error has occurred.
死亡信息。
我已经尝试过在导入到云SQL时注释我的postgis/其他扩展,但没有任何效果。
我已尝试使用
psql my_96_db < my_10.sql
并得到大量类似这样的错误:
...
CREATE TABLE
ERROR: syntax error at or near "AS"
LINE 2: AS integer
^
ERROR: relation "authentication_phonecontact_id_seq" does not exist
CREATE TABLE
...
我曾尝试在我的v10上使用postgres 9.6的pg\U还原
pg_dump -Fc
命令,但它不会成功导入到9.6数据库中。输出中的众多故障之一的示例是
pg_restore: [archiver (db)] could not execute query: ERROR: relation "public.authentication_referral_id_seq" does not exist
LINE 1: SELECT pg_catalog.setval('public.authentication_referral_id_...
^
Command was: SELECT pg_catalog.setval('public.authentication_referral_id_seq', 1, false);