From 1c7a4801da420f500564d3f66fad0f556554499c Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Mon, 30 Nov 2009 19:56:27 +0000 Subject: [PATCH] Updated SQL files for uninstallation to match current state. git-svn-id: http://svn.osgeo.org/postgis/trunk@4942 b70326c6-7e19-0410-871a-916f4a2858ee --- postgis/postgis_drop.sql.in.c | 3 +- postgis/uninstall_geography.sql.in.c | 143 +++++++++++++++++++++++++++ postgis/uninstall_postgis.sql.in.c | 71 ++++--------- 3 files changed, 163 insertions(+), 54 deletions(-) create mode 100644 postgis/uninstall_geography.sql.in.c diff --git a/postgis/postgis_drop.sql.in.c b/postgis/postgis_drop.sql.in.c index 662a7b0c8..52308576c 100644 --- a/postgis/postgis_drop.sql.in.c +++ b/postgis/postgis_drop.sql.in.c @@ -14,7 +14,7 @@ DROP FUNCTION IF EXISTS box2d_contained(box2d, box2d); DROP FUNCTION IF EXISTS box2d_overlap(box2d, box2d); DROP FUNCTION IF EXISTS box2d_same(box2d, box2d); DROP FUNCTION IF EXISTS box2d_intersects(box2d, box2d); -DROP FUNCTION IF EXISTS box2d_overleft(box2d, box2d); +DROP FUNCTION IF EXISTS st_box2d_overleft(box2d, box2d); DROP FUNCTION IF EXISTS st_box2d_overright(box2d, box2d); DROP FUNCTION IF EXISTS st_box2d_left(box2d, box2d); DROP FUNCTION IF EXISTS st_box2d_right(box2d, box2d); @@ -23,7 +23,6 @@ DROP FUNCTION IF EXISTS st_box2d_contained(box2d, box2d); DROP FUNCTION IF EXISTS st_box2d_overlap(box2d, box2d); DROP FUNCTION IF EXISTS st_box2d_same(box2d, box2d); DROP FUNCTION IF EXISTS st_box2d_intersects(box2d, box2d); -DROP FUNCTION IF EXISTS st_box2d_overleft(box2d, box2d); DROP FUNCTION IF EXISTS st_addbbox(geometry); DROP FUNCTION IF EXISTS st_dropbbox(geometry); DROP FUNCTION IF EXISTS st_hasbbox(geometry); diff --git a/postgis/uninstall_geography.sql.in.c b/postgis/uninstall_geography.sql.in.c new file mode 100644 index 000000000..ce69e0955 --- /dev/null +++ b/postgis/uninstall_geography.sql.in.c @@ -0,0 +1,143 @@ +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +-- +-- $Id$ +-- +-- PostGIS - Spatial Types for PostgreSQL +-- http://postgis.org/ +-- Copyright 2009 Paul Ramsey +-- +-- This is free software; you can redistribute and/or modify it under +-- the terms of the GNU General Public Licence. See the COPYING file. +-- +-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +-- metadata table +DROP VIEW geography_columns; + +-- indexes +DROP OPERATOR CLASS gist_geography_ops USING gist CASCADE; +DROP OPERATOR CLASS btree_geography_ops USING btree CASCADE; + +-- r-tree operator +DROP OPERATOR && (geography,geography); + +-- b-tree operators +DROP OPERATOR < (geography,geography); +DROP OPERATOR <= (geography,geography); +DROP OPERATOR = (geography,geography); +DROP OPERATOR >= (geography,geography); +DROP OPERATOR > (geography,geography); + +-- casts +DROP CAST IF EXISTS (geography AS geometry); +DROP CAST IF EXISTS (geography AS geography); +DROP CAST IF EXISTS (geometry AS geography); + +-- +-- Text hacks to over-ride implicit casting issues with GEOMETRY +-- TODO Remove for 2.0 +-- +DROP FUNCTION IF EXISTS ST_AsText(text); +DROP FUNCTION IF EXISTS ST_AsBinary(text); +DROP FUNCTION IF EXISTS ST_AsSVG(text); +DROP FUNCTION IF EXISTS ST_AsGML(text); +DROP FUNCTION IF EXISTS ST_AsKML(text); +DROP FUNCTION IF EXISTS ST_AsGeoJson(text); +DROP FUNCTION IF EXISTS ST_Distance(text, text); +DROP FUNCTION IF EXISTS ST_DWithin(text, text, float8); +DROP FUNCTION IF EXISTS ST_Area(text); +DROP FUNCTION IF EXISTS ST_Length(text); +DROP FUNCTION IF EXISTS ST_Covers(text, text); +DROP FUNCTION IF EXISTS ST_CoveredBy(text, text); +DROP FUNCTION IF EXISTS ST_Intersects(text, text); +DROP FUNCTION IF EXISTS ST_Buffer(text, float8); +DROP FUNCTION IF EXISTS ST_Intersection(text, text); + +-- functions +DROP FUNCTION IF EXISTS ST_AsText(geography); +DROP FUNCTION IF EXISTS ST_GeographyFromText(text); +DROP FUNCTION IF EXISTS ST_AsBinary(geography); +DROP FUNCTION IF EXISTS ST_GeographyFromBinary(bytea); +DROP FUNCTION IF EXISTS geography_typmod_dims(integer); +DROP FUNCTION IF EXISTS geography_typmod_srid(integer); +DROP FUNCTION IF EXISTS geography_typmod_type(integer); +DROP FUNCTION IF EXISTS geography(geometry); +DROP FUNCTION IF EXISTS geometry(geography); + +DROP FUNCTION IF EXISTS geography_gist_consistent(internal,geometry,int4); +DROP FUNCTION IF EXISTS geography_gist_compress(internal); +DROP FUNCTION IF EXISTS geography_gist_penalty(internal,internal,internal); +DROP FUNCTION IF EXISTS geography_gist_picksplit(internal, internal); +DROP FUNCTION IF EXISTS geography_gist_union(bytea, internal); +DROP FUNCTION IF EXISTS geography_gist_same(box2d, box2d, internal); +DROP FUNCTION IF EXISTS geography_gist_decompress(internal); +DROP FUNCTION IF EXISTS geography_gist_selectivity (internal, oid, internal, int4); +DROP FUNCTION IF EXISTS geography_gist_join_selectivity(internal, oid, internal, smallint); +DROP FUNCTION IF EXISTS geography_overlaps(geography, geography); + +DROP FUNCTION IF EXISTS geography_lt(geography, geography); +DROP FUNCTION IF EXISTS geography_le(geography, geography); +DROP FUNCTION IF EXISTS geography_gt(geography, geography); +DROP FUNCTION IF EXISTS geography_ge(geography, geography); +DROP FUNCTION IF EXISTS geography_eq(geography, geography); +DROP FUNCTION IF EXISTS geography_cmp(geography, geography); + +DROP FUNCTION IF EXISTS ST_AsSVG(geography,int4,int4); +DROP FUNCTION IF EXISTS ST_AsSVG(geography,int4); +DROP FUNCTION IF EXISTS ST_AsSVG(geography); + +DROP FUNCTION IF EXISTS _ST_AsGML(int4, geography, int4, int4); +DROP FUNCTION IF EXISTS ST_AsGML(geography, int4); +DROP FUNCTION IF EXISTS ST_AsGML(geography); +DROP FUNCTION IF EXISTS ST_AsGML(int4, geography); +DROP FUNCTION IF EXISTS ST_AsGML(int4, geography, int4); +DROP FUNCTION IF EXISTS ST_AsGML(geography, int4, int4); +DROP FUNCTION IF EXISTS ST_AsGML(int4, geography, int4, int4); + +DROP FUNCTION IF EXISTS _ST_AsKML(int4, geography, int4); +DROP FUNCTION IF EXISTS ST_AsKML(geography, int4); +DROP FUNCTION IF EXISTS ST_AsKML(geography); +DROP FUNCTION IF EXISTS ST_AsKML(int4, geography); +DROP FUNCTION IF EXISTS ST_AsKML(int4, geography, int4); + +DROP FUNCTION IF EXISTS _ST_AsGeoJson(int4, geography, int4, int4); +DROP FUNCTION IF EXISTS ST_AsGeoJson(geography, int4); +DROP FUNCTION IF EXISTS ST_AsGeoJson(geography); +DROP FUNCTION IF EXISTS ST_AsGeoJson(int4, geography); +DROP FUNCTION IF EXISTS ST_AsGeoJson(int4, geography, int4); +DROP FUNCTION IF EXISTS ST_AsGeoJson(geography, int4, int4); +DROP FUNCTION IF EXISTS ST_AsGeoJson(int4, geography, int4, int4); + +DROP FUNCTION IF EXISTS _ST_Distance(geography, geography, float8, boolean); +DROP FUNCTION IF EXISTS _ST_DWithin(geography, geography, float8, boolean); +DROP FUNCTION IF EXISTS ST_Distance(geography, geography, boolean); +DROP FUNCTION IF EXISTS ST_Distance(geography, geography); +DROP FUNCTION IF EXISTS _ST_Expand(geography, float8); +DROP FUNCTION IF EXISTS ST_DWithin(geography, geography, float8, boolean); +DROP FUNCTION IF EXISTS ST_DWithin(geography, geography, float8); +DROP FUNCTION IF EXISTS ST_Area(geography, boolean); +DROP FUNCTION IF EXISTS ST_Area(geography); +DROP FUNCTION IF EXISTS ST_Length(geography, boolean); +DROP FUNCTION IF EXISTS ST_Length(geography); +DROP FUNCTION IF EXISTS _ST_PointOutside(geography); +DROP FUNCTION IF EXISTS _ST_Covers(geography, geography); +DROP FUNCTION IF EXISTS ST_Covers(geography, geography); +DROP FUNCTION IF EXISTS ST_CoveredBy(geography, geography); +DROP FUNCTION IF EXISTS ST_Intersects(geography, geography); +DROP FUNCTION IF EXISTS _ST_BestSRID(geography, geography); +DROP FUNCTION IF EXISTS _ST_BestSRID(geography); +DROP FUNCTION IF EXISTS ST_Buffer(geography, float8); +DROP FUNCTION IF EXISTS ST_Intersection(geography, geography); +DROP FUNCTION IF EXISTS geography(geography, integer, boolean); + +--DROP FUNCTION IF EXISTS geography_in(cstring, oid, integer); +--DROP FUNCTION IF EXISTS geography_out(geography); +DROP TYPE geography CASCADE; +DROP FUNCTION IF EXISTS geography_typmod_in(cstring[]); +DROP FUNCTION IF EXISTS geography_typmod_out(integer); +DROP FUNCTION IF EXISTS geography_analyze(internal); + +-- DROP FUNCTION IF EXISTS gidx_in(cstring); +-- DROP FUNCTION IF EXISTS gidx_out(gidx); +DROP TYPE gidx CASCADE; + diff --git a/postgis/uninstall_postgis.sql.in.c b/postgis/uninstall_postgis.sql.in.c index 5a1bec99c..54b6ce17e 100644 --- a/postgis/uninstall_postgis.sql.in.c +++ b/postgis/uninstall_postgis.sql.in.c @@ -5,6 +5,7 @@ -- PostGIS - Spatial Types for PostgreSQL -- http://postgis.refractions.net -- Copyright 2001-2003 Refractions Research Inc. +-- Copyright 2009 Open Source Geospatial Foundation -- -- This is free software; you can redistribute and/or modify it under -- the terms of the GNU General Public Licence. See the COPYING file. @@ -29,6 +30,8 @@ DROP FUNCTION ST_MinimumBoundingCircle(inputgeom geometry, segs_per_quarter inte DROP FUNCTION ST_ShortestLine(geometry, geometry); DROP FUNCTION ST_LongestLine(geometry, geometry); DROP FUNCTION ST_DFullyWithin(geometry, geometry, float8); +DROP FUNCTION _ST_DumpPoints(geometry, integer[]); + --------------------------------------------------------------- -- SQL-MM --------------------------------------------------------------- @@ -44,6 +47,7 @@ DROP FUNCTION ST_CurveToLine(geometry, integer); #include "uninstall_sqlmm.sql.in.c" #include "uninstall_long_xact.sql.in.c" +#include "uninstall_geography.sql.in.c" DROP FUNCTION ST_BdMPolyFromText(text, integer); DROP FUNCTION BdMPolyFromText(text, integer); @@ -269,7 +273,6 @@ DROP FUNCTION ST_IsRing(geometry); DROP FUNCTION IsRing(geometry); DROP FUNCTION ST_Centroid(geometry); DROP FUNCTION Centroid(geometry); -DROP FUNCTION GEOSnoop(geometry); DROP FUNCTION ST_IsValid(geometry); DROP FUNCTION IsValid(geometry); DROP FUNCTION ST_Overlaps(geometry,geometry); @@ -324,20 +327,10 @@ DROP AGGREGATE ST_Collect(geometry); DROP AGGREGATE collect(geometry); DROP AGGREGATE ST_Union(geometry); --- TO BE REMOVED BEFORE RELEASE -DROP AGGREGATE ST_Union_Old(geometry); --- TO BE REMOVED BEFORE RELEASE -DROP AGGREGATE GeomUnion_Old(geometry); - DROP FUNCTION ST_Union (geometry[]); DROP FUNCTION ST_unite_garray (geometry[]); DROP FUNCTION unite_garray (geometry[]); --- TO BE REMOVED BEFORE RELEASE -DROP AGGREGATE ST_accum_old(geometry); --- TO BE REMOVED BEFORE RELEASE -DROP AGGREGATE accum_old(geometry); - DROP AGGREGATE ST_Accum(geometry); DROP AGGREGATE accum(geometry); @@ -353,16 +346,10 @@ DROP TYPE pgis_abs CASCADE; DROP AGGREGATE ST_MemUnion(geometry); DROP AGGREGATE MemGeomUnion(geometry); DROP FUNCTION ST_collect(geometry[]); -DROP FUNCTION ST_collect_garray(geometry[]); -DROP FUNCTION collect_garray(geometry[]); -DROP FUNCTION ST_geom_accum(geometry[],geometry); -DROP FUNCTION geom_accum (geometry[],geometry); DROP AGGREGATE ST_memcollect(geometry); DROP AGGREGATE memcollect(geometry); DROP FUNCTION ST_collect(geometry, geometry); DROP FUNCTION collect(geometry, geometry); -DROP FUNCTION ST_collector(geometry, geometry); -DROP FUNCTION collector(geometry, geometry); --------------------------------------------------------------- @@ -402,10 +389,10 @@ DROP FUNCTION _ST_buffer(geometry,float8,cstring); DROP FUNCTION ST_Intersection(geometry,geometry); DROP FUNCTION intersection(geometry,geometry); #if POSTGIS_GEOS_VERSION >= 32 -DROP FUNCTION ST_HausdorffDistance(geometry, geometry) +DROP FUNCTION ST_HausdorffDistance(geometry, geometry); #endif #if POSTGIS_GEOS_VERSION >= 32 -DROP FUNCTION ST_HausdorffDistance(geometry, geometry, float8) +DROP FUNCTION ST_HausdorffDistance(geometry, geometry, float8); #endif @@ -499,16 +486,16 @@ DROP FUNCTION box2d(geometry); ----------------------------------------------------------------------- DROP FUNCTION postgis_full_version(); +DROP FUNCTION postgis_lib_version(); +DROP FUNCTION postgis_version(); DROP FUNCTION postgis_lib_build_date(); DROP FUNCTION postgis_scripts_build_date(); DROP FUNCTION postgis_geos_version(); +DROP FUNCTION postgis_libxml_version(); DROP FUNCTION postgis_uses_stats(); DROP FUNCTION postgis_scripts_released(); -DROP FUNCTION postgis_lib_version(); DROP FUNCTION postgis_scripts_installed(); DROP FUNCTION postgis_proj_version(); -DROP FUNCTION postgis_version(); - --------------------------------------------------------------- -- PROJ support @@ -516,7 +503,6 @@ DROP FUNCTION postgis_version(); DROP FUNCTION ST_Transform(geometry,integer); DROP FUNCTION transform(geometry,integer); -DROP FUNCTION transform_geometry(geometry,text,text,int); DROP FUNCTION get_proj4_from_srid(integer); @@ -586,7 +572,6 @@ DROP FUNCTION ST_DumpRings(geometry); DROP FUNCTION DumpRings(geometry); DROP FUNCTION ST_Dump(geometry); DROP FUNCTION Dump(geometry); -DROP TYPE geometry_dump; DROP FUNCTION ST_LineMerge(geometry); DROP FUNCTION LineMerge(geometry); DROP FUNCTION ST_Polygonize (geometry[]); @@ -631,8 +616,6 @@ DROP FUNCTION MakePoint(float8, float8); -- MISC ------------------------------------------------------------------------ -DROP FUNCTION ST_Cache_BBox(); -DROP FUNCTION cache_bbox(); DROP FUNCTION ST_GeomFromEWKT(text); DROP FUNCTION GeomFromEWKT(text); DROP FUNCTION ST_GeomFromEWKB(bytea); @@ -649,11 +632,10 @@ DROP FUNCTION ST_AsEWKT(geometry); DROP FUNCTION AsEWKT(geometry); DROP FUNCTION ST_NDims(geometry); DROP FUNCTION ndims(geometry); -DROP FUNCTION ST_HasBBOX(geometry); DROP FUNCTION hasBBOX(geometry); +DROP FUNCTION postgis_cache_bbox(); DROP FUNCTION ST_zmflag(geometry); DROP FUNCTION zmflag(geometry); -DROP FUNCTION ST_noop(geometry); DROP FUNCTION noop(geometry); DROP FUNCTION ST_ForceRHR(geometry); DROP FUNCTION ForceRHR(geometry); @@ -690,7 +672,8 @@ DROP FUNCTION ST_azimuth(geometry,geometry); DROP FUNCTION azimuth(geometry,geometry); DROP FUNCTION ST_point_inside_circle(geometry,float8,float8,float8); DROP FUNCTION point_inside_circle(geometry,float8,float8,float8); -DROP FUNCTION ST_max_distance(geometry,geometry); +DROP FUNCTION _ST_MaxDistance(geometry,geometry); +DROP FUNCTION ST_maxdistance(geometry,geometry); DROP FUNCTION max_distance(geometry,geometry); DROP FUNCTION ST_Distance(geometry,geometry); DROP FUNCTION distance(geometry,geometry); @@ -763,9 +746,7 @@ DROP FUNCTION srid(chip); DROP FUNCTION getBBOX(geometry); DROP FUNCTION getSRID(geometry); -DROP FUNCTION ST_dropBBOX(geometry); DROP FUNCTION dropBBOX(geometry); -DROP FUNCTION ST_addBBOX(geometry); DROP FUNCTION addBBOX(geometry); @@ -865,27 +846,6 @@ DROP FUNCTION ST_geometry_lt(geometry, geometry); DROP FUNCTION geometry_lt(geometry, geometry); ----- BOX2D support functions - -DROP FUNCTION ST_box2d_intersects(box2d, box2d); -DROP FUNCTION box2d_intersects(box2d, box2d); -DROP FUNCTION ST_box2d_same(box2d, box2d); -DROP FUNCTION box2d_same(box2d, box2d); -DROP FUNCTION ST_box2d_overlap(box2d, box2d); -DROP FUNCTION box2d_overlap(box2d, box2d); -DROP FUNCTION ST_box2d_contained(box2d, box2d); -DROP FUNCTION box2d_contained(box2d, box2d); -DROP FUNCTION ST_box2d_contain(box2d, box2d); -DROP FUNCTION box2d_contain(box2d, box2d); -DROP FUNCTION ST_box2d_right(box2d, box2d); -DROP FUNCTION box2d_right(box2d, box2d); -DROP FUNCTION ST_box2d_left(box2d, box2d); -DROP FUNCTION box2d_left(box2d, box2d); -DROP FUNCTION ST_box2d_overright(box2d, box2d); -DROP FUNCTION box2d_overright(box2d, box2d); -DROP FUNCTION ST_box2d_overleft(box2d, box2d); -DROP FUNCTION box2d_overleft(box2d, box2d); - ----------------------------------------------------------------------- -- BOX2D @@ -963,6 +923,11 @@ DROP FUNCTION ST_Affine(geometry,float8,float8,float8,float8,float8,float8,float DROP FUNCTION Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8); +------------------------------------------------------------------- +-- GEOMETRY TYPE (geometry_dump) +------------------------------------------------------------------- +DROP TYPE geometry_dump CASCADE; + ------------------------------------------------------------------- -- GEOMETRY TYPE (lwgeom) ------------------------------------------------------------------- @@ -974,6 +939,8 @@ DROP TYPE geometry CASCADE; DROP FUNCTION ST_geometry_analyze(internal); DROP FUNCTION geometry_analyze(internal); +DROP FUNCTION geometry_gist_sel (internal, oid, internal, int4); +DROP FUNCTION geometry_gist_joinsel(internal, oid, internal, smallint); ------------------------------------------------------------------- -- SPHEROID TYPE -- 2.50.1