From: Regina Obe Date: Wed, 21 Sep 2011 03:23:45 +0000 (+0000) Subject: more changes to properly utilize extenions model, 1 remove create schema since extesn... X-Git-Tag: 2.0.0alpha1~979 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a635a0e93cba3e108423d40b982757bd91766b6f;p=postgis more changes to properly utilize extenions model, 1 remove create schema since extesnion creates it if not present, in control file designate postgis_core is required so create adds it to search path, more cleanup for unpackaged git-svn-id: http://svn.osgeo.org/postgis/trunk@7875 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/extensions/postgis_topology/Makefile b/extensions/postgis_topology/Makefile index 05f85aaee..81c92a8ff 100644 --- a/extensions/postgis_topology/Makefile +++ b/extensions/postgis_topology/Makefile @@ -20,22 +20,23 @@ sql/$(EXTENSION).sql: sql_bits/topology.sql sql_bits/topology_comments.sql cat $^ > $@ #strip BEGIN/COMMIT since these are not allowed in extensions +#strip CREATE SCHEMA since we force extension +# to create schema by setting schema to topology in control sql_bits/topology.sql: ../../topology/topology.sql - sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' $< > $@ + sed -e 's/BEGIN;//g' -e 's/COMMIT;//g' -e '/^CREATE SCHEMA/d;' $< > $@ sql_bits/topology_comments.sql: ../../doc/topology_comments.sql cp $< $@ -#grep all lines that start with CREATE OR REPLACE FUNCTION +#grep all lines that start with CREATE OR REPLACE FUNCTION, TRIGGER... #then replace CREATE OR REPLACE .. with ALTER EXTENSION..; -#then remove default values +#then remove default values and extra junk sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql: ../../topology/topology.sql - sed -e '/^CREATE \(OR REPLACE\|TRIGGER\|TYPE\|SCHEMA\|TABLE\)/!d;' \ + sed -e '/^CREATE \(OR REPLACE\|TRIGGER\|TYPE\|TABLE\|VIEW\)/!d;' \ -e 's/OR REPLACE//g' \ -e 's/CREATE\(.*\)/ALTER EXTENSION $(EXTENSION) ADD\1;/' \ -e 's/DEFAULT [a-zA-Z]\+//g' \ - -e 's/BEFORE\(.*\)/;/' \ - -e 's/AS\(.*\)/;/' \ + -e 's/\(BEFORE\|AS\)\(.*\)/;/' \ -e 's/(;/;/' \ -e 's/\\(;/;/' \ -e 's/;;/;/g' $< > $@ diff --git a/extensions/postgis_topology/postgis_topology.control b/extensions/postgis_topology/postgis_topology.control index 7cd7bf3fb..7db3ebd1a 100644 --- a/extensions/postgis_topology/postgis_topology.control +++ b/extensions/postgis_topology/postgis_topology.control @@ -2,3 +2,5 @@ comment = 'postgis topology spatial types and functions' default_version = '2.0.0' relocatable = false +schema = topology +requires = postgis_core