> "Sandro" == Sandro Santilli writes:
Sandro> PostGIS installs standard constraints of this kind:
Sandro> CHECK (geometrytype(g) = 'POINT'::text OR g IS NULL)
If geometrytype() is strict, the IS NULL condition is superfluous.
CHECK(x) _passes_ when x is null, rather than rejecting the r
PostGIS installs standard constraints of this kind:
CHECK (geometrytype(g) = 'POINT'::text OR g IS NULL)
The constraint is used by constraint_exclusion if using this condition:
WHERE g IS NOT NULL AND geometrytype(g) = 'LINESTRING'
But it is _NOT_ used if the NOT NULL condition is removed: