<div dir="ltr">I would also expect a list of ids. I've never seen ST_IsValid fail like that so it might be a bug. It would be helpful if you can provide the geometry to reproduce this case.<div><br></div><div>/Björn<br><div class="gmail_extra"><br><div class="gmail_quote">2017-03-06 12:21 GMT+01:00 Thomas Müller <span dir="ltr"><<a href="mailto:Thomas.Mueller@ksc-it.de" target="_blank">Thomas.Mueller@ksc-it.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="DE" link="#0563C1" vlink="#954F72">
<div class="m_8170379995182786703WordSection1">
<p class="MsoNormal">Hello,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-US">When importing Openstreetmap data in a Nominatim database on Ubuntu 14.04, Postgres 9.6, Postgis  2.3.2 there was a record with an invalid geometry. When doing
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">select place_id <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">from placex <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">where st_isvalid(geometry)=false<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I expected to get a list with the ids of all invalid records. Instead the Statement terminates on hitting the invalid record with a  </span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">SQL
 state: XX000 + Explanation why the geometry is invalid (Sorry for not noting it).<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">To get the actual id of the record I had to manually binary search over the ids. Luckily there was only one defect.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"">Is this really by design (and no other way)? Just listing all records with invalid geometries seems to be a quite useful query.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""><br>
Thanks in advance</span><span class="HOEnZb"><font color="#888888"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman",serif"><br>
Thomas Müller</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New""><u></u><u></u></span></font></span></p>
</div>
</div>

<br>______________________________<wbr>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-users</a><br></blockquote></div><br></div></div></div>