[postgis-devel] Error Upgrading PostGIS 2.5.4 to 3.1.5

Sandro Santilli strk at kbt.io
Mon May 15 10:42:33 PDT 2023


On Mon, May 15, 2023 at 03:14:38PM +0530, Nikhil Shetty wrote:

> 1. We had to drop below aggregate functions because st_combine_bbox is
> renamed to st_combinebbox
> create aggregate public.st_extent3d(box3d) (sfunc = public.st_combine_bbox,
> stype = box3d) - use st_combinebbox , st_3dextent
> create aggregate public.extent(box3d) (sfunc = public.st_combine_bbox,
> stype = box3d) - use st_combinebbox

The ST_Extent3D(box3d) aggregate was deprecated in PostGIS 2.0.0,
which made the functionality available as ST_3DExtent(geometry).

As of PostGIS-2.5 both Extent(box3d) and ST_Extent3D(box3d) aggregates
are ONLY found in the legacy.sql file (not installed by postgis.sql)
but are NOT removed when upgrading from earlier versions.

Was your database created before 2.0.0 or did you intentionally at some
point load the legacy.sql file ?

Dropping those aggregates was a sane thing to do, I'm not sure we
should handle replacement rather than automatically dropping those
aggregates. In any case a ticket would be useful to discuss this.

> ERROR: cannot drop function st_intersection(geometry,geometry) because
> other objects depend on it

Are you still upgrading to 3.1.5 ?
What is the exact upgrade procedure you are following ?
Any reason you're still not using the latest version from the 3.1 branch ?

The upgrade scripts for the current 3.1 branch has a rename
of the st_intersection(geometry,geometry) function, not a DROP,
and regression tests testing upgrade from 2.5 with views based
on st_intersection() are in place and passing on my system.

--strk;

  Libre GIS consultant/developer
  https://strk.kbt.io/services.html


More information about the postgis-devel mailing list