[postgis-tickets] [PostGIS] #3821: Don't drop st_union when updating postgis extension to 2.4

PostGIS trac at osgeo.org
Mon Aug 28 09:43:19 PDT 2017


#3821: Don't drop st_union when updating postgis extension to 2.4
--------------------------+---------------------------
  Reporter:  nextstopsun  |      Owner:  robe
      Type:  defect       |     Status:  new
  Priority:  medium       |  Milestone:  PostGIS 2.5.0
 Component:  postgis      |    Version:  2.3.x
Resolution:               |   Keywords:
--------------------------+---------------------------

Comment (by robe):

 I thought we had logic in place to DROP the aggregate from the extension
 before dropping the aggregate, but not seeing that logic here anymore so
 perhaps the extension machinery takes care of that now (it didn't in early
 days) like it does with CREATE where it is added to the extension if it is
 created during extension upgrade transaction and it is not already part of
 the extension.

 If you were working outside of the extension upgrade machinery, you would
 have to do:


 {{{
 ALTER EXTENSION postgis DROP AGGREGATE st_union(geometry);
 DROP AGGREGATE st_union(geometry);

 CREATE AGGREGATE st_union(geometry) (
   SFUNC=pgis_geometry_accum_transfn,
   STYPE=pgis_abs,
   FINALFUNC=pgis_geometry_union_finalfn
 );
 ALTER EXTENSION postgis ADD AGGREGATE st_union(geometry);

 }}}

 As far as why it fails before hitting end of transaction, I suspect DDL
 transactions always check dependencies even if the after state still
 satifies initial state because it can't absolutely be sure.

 So which version of PostgreSQL are you using?

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