ST_IsValid()


```typeselect id,  ST_isvalid(geom) from facilities where  ST_isvalid(geom) is null;delete from facilities where  ST_isvalid(geom) is null;```



```typeselect id,  ST_isvalid(geom) from facilities where  ST_isvalid(ST_CurveToLine(geom)) is false;delete from facilities where  ST_isvalid(ST_CurveToLine(geom)) is false;```