[postgis-tickets] [PostGIS] #4523: Upgrade 2.1.9 to 3.0.0rc1 - can not drop function st_union(geometry) because other objects depend on it

PostGIS trac at osgeo.org
Mon Oct 7 12:58:08 PDT 2019


#4523: Upgrade 2.1.9 to 3.0.0rc1 - can not drop function st_union(geometry)
because other objects depend on it
------------------------------------+---------------------------
  Reporter:  robe                   |      Owner:  strk
      Type:  defect                 |     Status:  new
  Priority:  medium                 |  Milestone:  PostGIS 3.0.0
 Component:  build/upgrade/install  |    Version:  trunk
Resolution:                         |   Keywords:
------------------------------------+---------------------------

Comment (by pramsey):

 On the other hand, this block in `postgis_upgrade_for_extension.sql.in`
 seems to drop the aggregate in all cases for Pg < 12.
 {{{
 $postgis_proc_upgrade$
 BEGIN
   IF current_setting('server_version_num')::integer >= 120000
   THEN
     EXECUTE $postgis_proc_upgrade_parsed_def$ CREATE OR REPLACE AGGREGATE
 ST_Union (geometry) (
         sfunc = pgis_geometry_accum_transfn,
         stype = internal,

         parallel = safe,

         finalfunc = pgis_geometry_union_finalfn
         );
  $postgis_proc_upgrade_parsed_def$;
   ELSIF 205 > version_from_num OR (
       205 = version_from_num AND version_from_isdev
     ) FROM _postgis_upgrade_info
   THEN
     EXECUTE 'DROP AGGREGATE IF EXISTS ST_Union (geometry)';
     EXECUTE $postgis_proc_upgrade_parsed_def$ CREATE AGGREGATE ST_Union
 (geometry) (
         sfunc = pgis_geometry_accum_transfn,
         stype = internal,

         parallel = safe,

         finalfunc = pgis_geometry_union_finalfn
         );
  $postgis_proc_upgrade_parsed_def$;
   END IF;
 END
 $postgis_proc_upgrade$;
 }}}
 Is your test on the durability of ST_Union a little too optimistic perhaps
 strk?

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4523#comment:4>
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