mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-23 16:42:35 +00:00
Simplify geometry type constraint (#3070)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13316 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
53f487070d
commit
54f661eeb1
1
NEWS
1
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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue