[postgis-tickets] [PostGIS] #2665: Extension upgrade needs to selectively drop from extension aggregates and functions
PostGIS
trac at osgeo.org
Fri Mar 7 08:42:01 PST 2014
#2665: Extension upgrade needs to selectively drop from extension aggregates and
functions
-----------------------------------+----------------------------------------
Reporter: robe | Owner: strk
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.1.2
Component: build/upgrade/install | Version: 2.1.x
Keywords: |
-----------------------------------+----------------------------------------
Comment(by robe):
Hmm what was I thinking. I just noticed I only do it for raster.
in extensions/postgis/makefile.in
{{{
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/' \
$< > $@
}}}
I know sloppy. But still I think we'll need to define logic that if you
are running PostgreSQL 9.1+, you need to try to drop from postgis
extension as well as whatever other drop you are doing and move this logic
into the upgrade generation script.
For 2.2 I 9.1 is our minimum version so we can just blindly try to drop
from extension.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2665#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