2

我正在将数据库从 PostGIS 2.2.1 移动到 2.5.0 (PG 9.6)。我 pg_dumped 旧数据库并使用 pg_restore 导入它。

一切似乎都很好,但我遇到了这两个错误。这是我需要担心的事情还是可以忽略它们?

pg_restore: creating AGGREGATE "public.accum(geometry)"
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 4925; 1255 348862 AGGREGATE accum(geometry) aed
pg_restore: [archiver (db)] could not execute query: ERROR:  type "pgis_abs" does not exist
Command was: CREATE AGGREGATE accum(geometry) (
    SFUNC = public.pgis_geometry_accum_transfn,
    STYPE = pgis_abs,
    FINALFUNC = pgis_geometry_accum_finalfn
);

和..

pg_restore: creating AGGREGATE "public.makeline(geometry)"
pg_restore: [archiver (db)] Error from TOC entry 4927; 1255 348864 AGGREGATE makeline(geometry) aed
pg_restore: [archiver (db)] could not execute query: ERROR:  type "pgis_abs" does not exist
Command was: CREATE AGGREGATE makeline(geometry) (
    SFUNC = public.pgis_geometry_accum_transfn,
    STYPE = pgis_abs,
    FINALFUNC = pgis_geometry_makeline_finalfn
);
4

2 回答 2

2

显然,根据此提交pgis_abs,该列是一个虚拟列:

#4035,从聚合/收集例程中删除虚拟 pgis_abs 类型

听起来您应该能够pgis_abs在执行升级之前删除该列

披露:我为EnterpriseDB (EDB)工作

于 2019-12-12T01:29:32.207 回答
0

我强烈建议您在恢复带有 postgis 扩展名的 pg_dumped 文件时使用“postgis_restore.pl”,而不是 pg_restore 命令本身。

https://github.com/postgis/postgis/blob/svn-trunk/utils/postgis_restore.pl.in

于 2018-11-01T00:25:10.213 回答