* Enhancements *
+ - #3070, Simplify geometry type constraint
- #2839, Implement selectivity estimator for functional indexes,
speeding up spatial queries on raster tables.
(Sandro Santilli / Vizzuality)
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