By default, the server does not validate spatial data as it is created or imported from other formats.
The ST_IsValid method can be used to verify that the imported data represents a geometry that is valid.
Operations on invalid geometries return undefined results.
The following returns the result 0 because the polygons within the geometry
self-intersect at a surface. Note that self-intersections of a
geometry collection at finite number of points is considered valid.