[postgis-users] Strange behaviour of = operator

strk at refractions.net strk at refractions.net
Tue Feb 7 03:01:19 PST 2006


On Tue, Feb 07, 2006 at 10:55:11AM +0200, Steffen Macke wrote:
> Hello All,
> 
> Is the "=" operator only evaluating the bounding boxes of geometries?

Yes

> Is it possible to use a distinct query that uses a better comparison
> function/operator like equals()?

The distinct, group by and order by operators all use the btree opclass,
which for postgis uses bounding box comparison.

Your best bet is modifying the btree opclass to use equals() instead.
Note that use of any of the above operators would then fail if you
don't have GEOS or JTS support compiled in.

--strk;



More information about the postgis-users mailing list