]> granicus.if.org Git - postgis/commitdiff
Simplify geometry type constraint (#3070)
authorSandro Santilli <strk@keybit.net>
Fri, 6 Mar 2015 08:51:14 +0000 (08:51 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 6 Mar 2015 08:51:14 +0000 (08:51 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13316 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
postgis/postgis.sql.in

diff --git a/NEWS b/NEWS
index 98802a9d5c4b1099b528a3221f49910f8d283146..d45467e52210a76cfd1f585f4a349b0c6ab95e66 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -62,6 +62,7 @@ PostGIS 2.2.0
 
  * Enhancements *
 
+  - #3070, Simplify geometry type constraint
   - #2839, Implement selectivity estimator for functional indexes,
            speeding up spatial queries on raster tables.
            (Sandro Santilli / Vizzuality)
index ec84fa19a773ab485e9e680b317618fcd1282824..5518c60caa268b67d878c8dd8713faac3fcddd9e 100644 (file)
@@ -2029,7 +2029,7 @@ BEGIN
                     BEGIN
                         EXECUTE 'ALTER TABLE ONLY ' || quote_ident(gcs.nspname) || '.' || quote_ident(gcs.relname) || '
                         ADD CONSTRAINT ' || quote_ident('enforce_geotype_' || gcs.attname) || '
-                        CHECK ((geometrytype(' || quote_ident(gcs.attname) || ') = ' || quote_literal(gtype) || ') OR (' || quote_ident(gcs.attname) || ' IS NULL))';
+                        CHECK (geometrytype(' || quote_ident(gcs.attname) || ') = ' || quote_literal(gtype) || ')';
                         constraint_successful := true;
                     EXCEPTION
                         WHEN check_violation THEN