[postgis-devel] Should EMPTY be spatially equal to self ?

'Sandro Santilli' strk at keybit.net
Sun Jan 15 06:42:16 PST 2012


On Sat, Jan 14, 2012 at 06:24:31AM -0500, Paragon Corporation wrote:
> > On Fri, Jan 13, 2012 at 09:53:31AM +0100, Sandro Santilli wrote:

> > Regina: I've seen your commit removing documentation of ~=.
> > 
> > Why so ? I've unleashed the operator use of GiST index this 
> > morning making the documentation you removed perfectly match 
> > the current code...
> 
> strk,
> 
> First as we twiddle our thumbs more and more people are using PostGIS
> 2.0.0SVN in production mose
> cause they have no choice -- they need the functionality and now you expect
> them to 
> do a dump / reload and for what? 
>
> So they can get ~= to use an index which is not backward compatible even
> with the same versions of PostGIS.

I don't expect anyone to do anything.
Anyway, if they do, they'll get a clean version of the 2.0 release.
And note that it's still too early to do that, as 2.0 isn't out yet.

Also note that the only change you get by doing or not the dump/reload
is using or not an index when you use the ~= operator.

Also note that the documentation (the one you removed) was already
advertising ~= as using an index.

> I took out of the the docs, because I don't want third party vendors relying
> on it and scratching their head
> when it behaves slower or different even on the same version of PostGIS.

Which "same version" ? 2.0.0SVN ?
You can't expect an "SVN" version to ever be equal to self..

> I would also appreciate if you put && back for ST_Equals.  I need that I and
> don't expect to have to do a dump
> / reload to get that to use an index.

I didn't change ST_Equals at all, since it's still being discussed
what it should return on empties. Do the docs say anything about it ?
Note that currently _ST_Equals will return TRUE for empty-empty case
while ST_Equals will return FALSE. So this is something we DO want
to fix, no matter if it takes a dump/reload.

> You know what would be REALLY USEFUL.  IF we had a real geometric equality
> operator like ~= used to be in 1.3
> so that people who want to use CONSTRAINT EXCLUSION to enforce uniqueness of
> their geometries CAN.

Filed a ticket about it ?

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list