]> granicus.if.org Git - postgis/commitdiff
Changed AddGeometryColumn to handle TYPEM.
authorSandro Santilli <strk@keybit.net>
Thu, 7 Oct 2004 17:17:37 +0000 (17:17 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 7 Oct 2004 17:17:37 +0000 (17:17 +0000)
Updated SCRIPTS_VERSION to 1.1.0

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

lwgeom/Makefile
lwgeom/lwpostgis.sql.in

index d177761070e90b4102f5c489c4708c333f8062fc..b566c4bc8c4230eba849b54586c453625775c3b2 100644 (file)
@@ -18,7 +18,7 @@ NAME=lwgeom
 SO_MAJOR_VERSION=1
 SO_MINOR_VERSION=0
 SO_MICRO_VERSION=0
-SCRIPTS_VERSION=1.0.0
+SCRIPTS_VERSION=1.1.0
 ifeq (${USE_VERSION},71) 
        MODULE_FILENAME = $(LPATH)/$(shlib)
        MODULE_INSTALLDIR = $(libdir)
index 3fd0e9dc0ce1003d5ff3230b6584b8dfdb31bed2..4790524449a608b10434a1dc62db86cf45cc98df 100644 (file)
@@ -2080,12 +2080,22 @@ BEGIN
                   (new_type =''POLYGON'') or
                   (new_type =''MULTIPOLYGON'') or
                   (new_type =''LINESTRING'') or
-                  (new_type =''MULTILINESTRING'')) )
+                  (new_type =''MULTILINESTRING'') or
+                  (new_type =''GEOMETRYCOLLECTIONM'') or
+                  (new_type =''POINTM'') or 
+                  (new_type =''MULTIPOINTM'') or
+                  (new_type =''POLYGONM'') or
+                  (new_type =''MULTIPOLYGONM'') or
+                  (new_type =''LINESTRINGM'') or
+                  (new_type =''MULTILINESTRINGM'')) )
        THEN
                RAISE EXCEPTION ''Invalid type name - valid ones are: 
                        GEOMETRY, GEOMETRYCOLLECTION, POINT, 
                        MULTIPOINT, POLYGON, MULTIPOLYGON, 
-                       LINESTRING, or MULTILINESTRING '';
+                       LINESTRING, MULTILINESTRING,
+                       GEOMETRYCOLLECTIONM, POINTM, 
+                       MULTIPOINTM, POLYGONM, MULTIPOLYGONM, 
+                       LINESTRINGM, or MULTILINESTRINGM '';
                return ''fail'';
        END IF;
 
@@ -2094,6 +2104,12 @@ BEGIN
                return ''fail'';
        END IF;
 
+       IF ( (new_type LIKE ''%M'') and (new_dim!=3) ) THEN
+
+               RAISE EXCEPTION ''TypeM needs 3 dimensions'';
+               return ''fail'';
+       END IF;
+
 #if USE_VERSION >= 73
        IF ( schema_name != '''' ) THEN
                schema_ok = ''f'';