问题
I'm moving a database from PostGIS 2.2.1 to 2.5.0 (PG 9.6). I pg_dumped the old database and am using pg_restore to import it.
Everything appears to go fine but I'm getting these two errors. Is this something I need to worry about or can just ignore them?
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
);
and..
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
);
回答1:
Apparently, the pgis_abs
column is a dummy column, as per this commit:
#4035, remove dummy pgis_abs type from aggregate/collect routines
Sounds like you should be able to drop the pgis_abs
column before performing the upgrade
Disclosure: I work for EnterpriseDB (EDB)
回答2:
I strongly recommend you should use "postgis_restore.pl" when restore the pg_dumped file with postgis extension, not pg_restore command itself.
https://github.com/postgis/postgis/blob/svn-trunk/utils/postgis_restore.pl.in
来源:https://stackoverflow.com/questions/53047614/postgis-upgrade-2-2-1-2-5-0-database-import-errors