我正在尝试恢复postgres datbase。
此数据库包含邮政数据。但是在还原sql转储时,我遇到了以下错误:
psql:postgis_db_dump.sql:2174: ERROR: type "public.pgis_abs" does not exist
正在运行的系统已安装 postgresql-10-postgis-2.4 ,而我尝试还原到的新系统具有 postgresql-11-postgis-2.5
在旧系统上,\ dT给出:
Schema | Name | Description
--------+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
public | addbandarg | postgis raster type: A composite type used as input into the ST_AddBand function defining the attributes and initial value of the new band.
public | agg_count |
public | agg_samealignment |
public | box2d | postgis type: A box composed of x min, ymin, xmax, ymax. Often used to return the 2d enclosing box of a geometry.
public | box2df |
public | box3d | postgis type: A box composed of x min, ymin, zmin, xmax, ymax, zmax. Often used to return the 3d extent of a geometry or collection of geometries.
public | box3d_extent |
public | chip |
public | geography | postgis type: Ellipsoidal spatial data type.
public | geometry | postgis type: Planar spatial data type.
public | geometry_dump | postgis type: A spatial datatype with two fields - geom (holding a geometry object) and path[] (a 1-d array holding the position of the geometry within the dumped object.)
public | geomval | postgis raster type: A spatial datatype with two fields - geom (holding a geometry object) and val (holding a double precision pixel value from a raster band).
public | gidx |
public | pgis_abs |
public | rastbandarg | postgis raster type: A composite type for use when needing to express a raster and a band index of that raster.
public | raster | postgis raster type: raster spatial data type.
public | reclassarg | postgis raster type: A composite type used as input into the ST_Reclass function defining the behavior of reclassification.
public | spheroid |
public | summarystats | postgis raster type: A composite type returned by the ST_SummaryStats and ST_SummaryStatsAgg functions.
public | unionarg | postgis raster type: A composite type used as input into the ST_Union function defining the bands to be processed and behavior of the UNION operation.
public | valid_detail |
(21 rows)
但是在新系统上,我得到:
Schema | Name | Description
--------+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
public | addbandarg | postgis raster type: A composite type used as input into the ST_AddBand function defining the attributes and initial value of the new band.
public | agg_count |
public | agg_samealignment |
public | box2d | postgis type: A box composed of x min, ymin, xmax, ymax. Often used to return the 2d enclosing box of a geometry.
public | box2df |
public | box3d | postgis type: A box composed of x min, ymin, zmin, xmax, ymax, zmax. Often used to return the 3d extent of a geometry or collection of geometries.
public | geography | postgis type: Ellipsoidal spatial data type.
public | geometry | postgis type: Planar spatial data type.
public | geometry_dump | postgis type: A spatial datatype with two fields - geom (holding a geometry object) and path[] (a 1-d array holding the position of the geometry within the dumped object.)
public | geomval | postgis raster type: A spatial datatype with two fields - geom (holding a geometry object) and val (holding a double precision pixel value from a raster band).
public | gidx |
public | rastbandarg | postgis raster type: A composite type for use when needing to express a raster and a band index of that raster.
public | raster | postgis raster type: raster spatial data type.
public | reclassarg | postgis raster type: A composite type used as input into the ST_Reclass function defining the behavior of reclassification.
public | spheroid |
public | summarystats | postgis raster type: A composite type returned by the ST_SummaryStats and ST_SummaryStatsAgg functions.
public | tablefunc_crosstab_2 |
public | tablefunc_crosstab_3 |
public | tablefunc_crosstab_4 |
public | textual_identity |
public | unionarg | postgis raster type: A composite type used as input into the ST_Union function defining the bands to be processed and behavior of the UNION operation.
public | valid_detail |
(22 rows)
似乎数据类型不再存在。有谁知道解决这个问题的最佳方法?
答案 0 :(得分:0)
显然,pgis_abs
列是虚拟列as per this commit:
4035,从聚合/收集例程中删除伪pgis_abs类型
听起来像您应该能够在执行升级之前删除pgis_abs
列
另请参阅this post