[postgis-tickets] [PostGIS] #5569: postgis_restore doesn't strip some old functions
PostGIS
trac at osgeo.org
Mon Oct 16 03:14:31 PDT 2023
#5569: postgis_restore doesn't strip some old functions
-----------------------------------+---------------------------
Reporter: kesar | Owner: strk
Type: defect | Status: new
Priority: low | Milestone: PostGIS 3.4.1
Component: build/upgrade/install | Version: 3.4.x
Keywords: postgis_restore |
-----------------------------------+---------------------------
Hi,
we are migrating an old database to a new server and doing the HARD
UPGRADE (as instructed in
http://postgis.net/docs/manual-3.4/postgis_administration.html#hard_upgrade)
from Postgis 2.1.8 to 3.4.
Seems that some deprecated/old functions are not stripped by
''postgis_restore'':
{{{
CREATE FUNCTION pgis_abs_in(cstring) RETURNS pgis_abs
LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-2.1', 'pgis_abs_in';
CREATE FUNCTION pgis_abs_out(pgis_abs) RETURNS cstring
LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-2.1', 'pgis_abs_out';
CREATE FUNCTION pgis_geometry_accum_finalfn(pgis_abs) RETURNS geometry[]
LANGUAGE c
AS '$libdir/postgis-2.1', 'pgis_geometry_accum_finalfn';
CREATE FUNCTION pgis_geometry_accum_transfn(pgis_abs, geometry) RETURNS
pgis_abs
LANGUAGE c
AS '$libdir/postgis-2.1', 'pgis_geometry_accum_transfn';
CREATE FUNCTION pgis_geometry_collect_finalfn(pgis_abs) RETURNS geometry
LANGUAGE c
AS '$libdir/postgis-2.1', 'pgis_geometry_collect_finalfn';
CREATE FUNCTION pgis_geometry_makeline_finalfn(pgis_abs) RETURNS geometry
LANGUAGE c
AS '$libdir/postgis-2.1', 'pgis_geometry_makeline_finalfn';
CREATE FUNCTION pgis_geometry_polygonize_finalfn(pgis_abs) RETURNS
geometry
LANGUAGE c
AS '$libdir/postgis-2.1', 'pgis_geometry_polygonize_finalfn';
CREATE FUNCTION pgis_geometry_union_finalfn(pgis_abs) RETURNS geometry
LANGUAGE c
AS '$libdir/postgis-2.1', 'pgis_geometry_union_finalfn';
CREATE FUNCTION st_askml(geog geography, maxdecimaldigits integer DEFAULT
15) RETURNS text
LANGUAGE sql IMMUTABLE STRICT
AS $_$SELECT _ST_AsKML(2, $1, $2, null)$_$;
CREATE FUNCTION st_askml(geom geometry, maxdecimaldigits integer DEFAULT
15) RETURNS text
LANGUAGE sql IMMUTABLE STRICT
AS $_$ SELECT _ST_AsKML(2, ST_Transform($1,4326), $2, null); $_$;
CREATE FUNCTION st_dwithin(geography, geography, double precision) RETURNS
boolean
LANGUAGE sql IMMUTABLE
AS $_$SELECT $1 && _ST_Expand($2,$3) AND $2 && _ST_Expand($1,$3) AND
_ST_DWithin($1, $2, $3, true)$_$;
}}}
It also tries to add comments to non-existent functions and constraints to
already existing Postgis 3.4 tables.
Here are the error messages:
{{{
ERROR: could not access file "$libdir/postgis-2.1": No such file or
directory
ERROR: function public.pgis_abs_in(cstring) does not exist
ERROR: could not access file "$libdir/postgis-2.1": No such file or
directory
ERROR: function public.pgis_abs_out(pgis_abs) does not exist
ERROR: could not access file "$libdir/postgis-2.1": No such file or
directory
ERROR: function public.pgis_geometry_accum_finalfn(pgis_abs) does not
exist
ERROR: could not access file "$libdir/postgis-2.1": No such file or
directory
ERROR: function public.pgis_geometry_accum_transfn(pgis_abs, geometry)
does not exist
ERROR: could not access file "$libdir/postgis-2.1": No such file or
directory
ERROR: function public.pgis_geometry_collect_finalfn(pgis_abs) does not
exist
ERROR: could not access file "$libdir/postgis-2.1": No such file or
directory
ERROR: function public.pgis_geometry_makeline_finalfn(pgis_abs) does not
exist
ERROR: could not access file "$libdir/postgis-2.1": No such file or
directory
ERROR: function public.pgis_geometry_polygonize_finalfn(pgis_abs) does
not exist
ERROR: could not access file "$libdir/postgis-2.1": No such file or
directory
ERROR: function public.pgis_geometry_union_finalfn(pgis_abs) does not
exist
ERROR: function st_asgeojson(integer, geography, integer, integer) does
not exist
ERROR: function st_asgeojson(integer, geometry, integer, integer) does
not exist
ERROR: function st_askml(integer, geography, integer, text) does not
exist
ERROR: function st_count(text, text, boolean) does not exist
ERROR: function st_count(text, text, integer, boolean) does not exist
ERROR: function st_force3d(geometry) does not exist
ERROR: function st_force3dm(geometry) does not exist
ERROR: function st_force3dz(geometry) does not exist
ERROR: function st_force4d(geometry) does not exist
ERROR: function st_histogram(text, text, integer, integer, boolean) does
not exist
ERROR: function st_histogram(text, text, integer, boolean, integer,
boolean) does not exist
ERROR: function st_histogram(text, text, integer, integer, double
precision[], boolean) does not exist
ERROR: function st_histogram(text, text, integer, boolean, integer,
double precision[], boolean) does not exist
ERROR: function st_quantile(text, text, integer, double precision[]) does
not exist
ERROR: function st_quantile(text, text, integer, boolean, double
precision[]) does not exist
ERROR: function st_summarystats(text, text, boolean) does not exist
ERROR: function st_summarystats(text, text, integer, boolean) does not
exist
ERROR: function validatetopology(character varying) does not exist
ERROR: multiple primary keys for table "layer" are not allowed
ERROR: relation "layer_schema_name_table_name_feature_column_key" already
exists
ERROR: relation "topology_name_key" already exists
ERROR: multiple primary keys for table "topology" are not allowed
ERROR: rule "geometry_columns_delete" for relation "geometry_columns"
already exists
ERROR: rule "geometry_columns_insert" for relation "geometry_columns"
already exists
ERROR: rule "geometry_columns_update" for relation "geometry_columns"
already exists
ERROR: trigger "layer_integrity_checks" for relation "layer" already
exists
ERROR: constraint "layer_topology_id_fkey" for relation "layer" already
exists
ERROR: multiple primary keys for table "spatial_ref_sys" are not allowed
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5569>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list