<br><br><div class="gmail_quote">On 26 May 2011 18:46, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net">strk@keybit.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, May 26, 2011 at 06:17:47PM +0100, Brian Quinion wrote:<br>
> Adrian,<br>
><br>
> I had this occur once with a schema that I had updated between<br>
> versions of postgis.  I never did entirely get to the bottom of it - I<br>
> ended up adding ::text in a similar way to what Sandro suggested.<br>
> i.e.:<br>
><br>
> existing.geometry::text != NEW.geometry::text<br>
><br>
> It was a crude hack (and probably hurt performance) and didn't seem to<br>
> be needed the result of the time so I never committed it.<br>
<br>
</div>I'm sure binary tree operators used to do bounding box checks.<br>
Your ::text cast instead would do a bitwise comparison.<br>
There are few ways to compare geometries, and with recent versions<br>
also Hausdorf distance for similarities.<br>
<div><div></div><br></div></blockquote><div><br>I said it was a crude hack not worth commiting - you don't have to convince me. I can however confirm that it definitely works and fixes the error as given.  The bitwise comparison isn't that horrible in this case since we are only interested in a perfect equivalence not a geometric relationship.<br>
<br>--<br> Brian<br></div></div>