I have a column with POLYGON strings, and before processing the geo data I need to convert them with ST_GEOGFROMTEXT. However, I probably have some rows with invalid polygons and I get the following error Error: ST_GeogFromText failed: Invalid polygon loop: Edge 0 has duplicate vertex with edge 4025 This is my query SELECT st_geogfromtext(string_field_1) FROM t Is there a way to deal with incorrect polygons, or at least to identify which row returns the problem? Continue reading...