]> granicus.if.org Git - postgis/commitdiff
Further simplify extension wrapping
authorSandro Santilli <strk@keybit.net>
Tue, 9 Feb 2016 08:35:02 +0000 (08:35 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 9 Feb 2016 08:35:02 +0000 (08:35 +0000)
See #3450

git-svn-id: http://svn.osgeo.org/postgis/trunk@14632 b70326c6-7e19-0410-871a-916f4a2858ee

extensions/postgis/Makefile.in

index 1bcb2f0c324e64525d612b481dc4d5856af521ce..8018e6ca3b883380f772c6e64ae4b3dfc11d2e22 100644 (file)
@@ -73,24 +73,14 @@ sql_bits/rtpostgis.sql: ../../raster/rt_pg/rtpostgis.sql
 sql_bits/spatial_ref_sys_config_dump.sql: ../../spatial_ref_sys.sql ../../utils/create_spatial_ref_sys_config_dump.pl
        : ../../utils/create_spatial_ref_sys_config_dump.pl $< > $@
 
-# we need to also drop this temporary function from the extension
-# for casts that are being dropped we need to drop them 
-# from extension only if they are in the existension so we use our postgis_extension_drop..
-# so that it will silently fail if cast is not in extension
 sql_bits/rtpostgis_upgrade.sql: ../../raster/rt_pg/rtpostgis_upgrade.sql
        sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' \
-               -e 's/DROP FUNCTION _rename_raster_tables();/ALTER EXTENSION ${EXTENSION} DROP FUNCTION _rename_raster_tables();DROP FUNCTION _rename_raster_tables();/g' \
-               -e 's/DROP FUNCTION _drop_st_samealignment();/ALTER EXTENSION ${EXTENSION} DROP FUNCTION _drop_st_samealignment();DROP FUNCTION _drop_st_samealignment();/g' \
-               -e 's/DROP CAST\(.*\)/SELECT postgis_extension_drop_if_exists('\''$(EXTENSION)'\'', '\''DROP CAST \1'\'');DROP CAST \1/' \
+                 -e "s/^\(DROP .*\);/SELECT postgis_extension_drop_if_exists('${EXTENSION}', '\1');\n\1;/" \
        $< > $@
 
-#don't drop casts just yet since we don't have provision to remove from extension yet
-#TODO: check the above statement, as I do see DROP CAST handled for raster instead
 sql_bits/postgis_upgrade.sql: ../../postgis/postgis_upgrade.sql 
                 sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' \
-                -e '/^\(DROP\|CREATE\) \(CAST\).*;/d' \
-                -e '/^\(DROP\|CREATE\) \(CAST\)/,/\;/d' \
-                -e "s/^\(DROP .*\);/SELECT postgis_extension_drop_if_exists('${EXTENSION}', '\1');\1;/" \
+                    -e "s/^\(DROP .*\);/SELECT postgis_extension_drop_if_exists('${EXTENSION}', '\1');\n\1;/" \
                 $< > $@