[postgis-devel] Recheck on Points broken

Paul Ramsey pramsey at cleverelephant.ca
Tue Jan 3 07:00:21 PST 2017


Are we 100% sure this is a float/double issue? The distance between two
float boxes should always be *smaller* than the actual distance between two
objects, since the float box extrema are always moved *away* from the
original object when the float boxes are created. So from a "theoretical
mechanics" perspective this shouldn't actually be the source of the problem.

>From a real world point-of-view, how could it still be the problem?
- maybe the box generation code has a short circuit for points which
doesn't do the correct thing? Pretty sure it doesn't, but.
- something else?

P


On Tue, Jan 3, 2017 at 4:54 AM, Regina Obe <lr at pcorp.us> wrote:

>
> >> Anyrate if there is nothing that can be done about ensuring index
> >> distance is always less or equal to actual distance
>
> > I remember we were all happy about having *real* distance with a more
> recent PostgreSQL. If that's not the case (as the user reports) we should
> try to find a way to provide both mechanisms.
> > Two different operators, maybe ?
> > --strk;
>
> We've already got two different operators.  We have <#> which doesn't use
> recheck and that's what I told the user to use, until we resolve this.
>
> The thing is the <-> I think pretty much for all reasonable purposes
> returns the right order for points (and in fact in this case yields the
> same value and <-> I think in all cases it will).
>
> So it's just the float4/float8 mess why it screws up and it Errors noisily
> in PostgreSQL land where we cannot control.
>
> I hate telling people to if you have point / point use <#> and if you have
> others you can safely use  <->.  That's sooo unfriendly.
>
> I think the best thing is just to not have point-point checks use
> recheck.  Can we do that easily? That's what PostgreSQL point/point does.
> That way we don't fall into the PostgreSQL box trap of
>
> "Hey -- how come your index distance is bigger than your computed
> distance.  What kind of monster are you? Screw you!"
>
> Thanks,
> Regina
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20170103/5efddb4d/attachment.html>


More information about the postgis-devel mailing list