]> granicus.if.org Git - postgis/commitdiff
#1430: create topology_drop_before and topology_drop_after to allow changing names...
authorRegina Obe <lr@pcorp.us>
Thu, 5 Jan 2012 07:59:16 +0000 (07:59 +0000)
committerRegina Obe <lr@pcorp.us>
Thu, 5 Jan 2012 07:59:16 +0000 (07:59 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8676 b70326c6-7e19-0410-871a-916f4a2858ee

topology/Makefile.in
topology/topology_drop_after.sql.in.c [new file with mode: 0644]
topology/topology_drop_before.sql.in.c [new file with mode: 0644]

index 81a709c8e82295cea7aceab995a75d3ddc41f995..9845269d80e31686ea1dd52c4bc3e3d8ae2e4edc 100644 (file)
@@ -27,7 +27,7 @@ MODULEDIR=contrib/$(PGIS_MODULE_big)
 DATA_built=topology.sql topology_upgrade_20_minor.sql uninstall_topology.sql
 
 # SQL objects (files requiring C pre-processing)
-SQL_OBJS=topology.sql.in
+SQL_OBJS=topology.sql.in topology_drop_before.sql.in topology_drop_after.sql.in
 
 # Extra files to remove during 'make clean'
 EXTRA_CLEAN=$(SQL_OBJS)
@@ -61,10 +61,13 @@ $(SQL_OBJS): %.in: %.in.c
        
 #Generate upgrade script by stripping things that can't be reinstalled
 #e.g. don't bother with tables, types, triggers, and domains
-topology_upgrade_20_minor.sql:  topology.sql
+topology_upgrade.sql:  topology.sql
         sed -e '/^\(CREATE\|ALTER\) \(CAST\|TYPE\|TABLE\|SCHEMA\|DOMAIN\|TRIGGER\).*;/d' \
                 -e '/^\(CREATE\|ALTER\) \(CAST\|TYPE\|TABLE\|SCHEMA\|DOMAIN\|TRIGGER\)/,/\;/d' \
                 $< > $@
+                
+topology_upgrade_20_minor.sql:  topology_drop_before.sql topology_upgrade.sql topology_drop_after.sql
+       cat $^ > $@
 
 topology.sql.in: sql/sqlmm.sql sql/populate.sql sql/polygonize.sql sql/gml.sql sql/query/getnodebypoint.sql sql/query/getedgebypoint.sql sql/query/getfacebypoint.sql sql/query/GetRingEdges.sql sql/manage/TopologySummary.sql sql/manage/CopyTopology.sql sql/manage/ManageHelper.sql sql/topoelement/topoelement_agg.sql sql/topogeometry/type.sql sql/topogeometry/totopogeom.sql sql/predicates.sql
 
diff --git a/topology/topology_drop_after.sql.in.c b/topology/topology_drop_after.sql.in.c
new file mode 100644 (file)
index 0000000..c7e8658
--- /dev/null
@@ -0,0 +1,19 @@
+-- $Id$
+-- PostGIS - Spatial Types for PostgreSQL
+-- http://www.postgis.org
+--
+-- Copyright (C) 2012 Regina Obe <lr@pcorp.us>
+-- This is free software; you can redistribute and/or modify it under
+-- the terms of the GNU General Public Licence. See the COPYING file.
+--
+--  
+-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+-- These are reserved for functions where the they are changed to use default args  
+-- This is installed after the new functions are installed
+-- We don't have any of these yet for topology
+-- The reason we put these after install is 
+-- you can't drop a function that is used by sql functions
+-- without forcing a drop on those as well which may cause issues with user functions.  
+-- This allows us to CREATE OR REPLACE those in general topology.sql
+-- without dropping them.
+
diff --git a/topology/topology_drop_before.sql.in.c b/topology/topology_drop_before.sql.in.c
new file mode 100644 (file)
index 0000000..2a4d24f
--- /dev/null
@@ -0,0 +1,17 @@
+-- $Id$
+-- PostGIS - Spatial Types for PostgreSQL
+-- http://www.postgis.org
+--
+-- Copyright (C) 2012 Regina Obe <lr@pcorp.us>
+-- This is free software; you can redistribute and/or modify it under
+-- the terms of the GNU General Public Licence. See the COPYING file.
+--
+--  
+-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+-- These are functions where the argument names may have changed  --
+-- so have to be dropped before upgrade can happen for 9.0+ --
+-- argument names changed --
+-- we might want to take toTopoGeom one out before release since
+-- I don't think too many people installed the bad name
+DROP FUNCTION IF EXISTS topology.toTopoGeom(Geometry, varchar, int, float8);
+