[postgis-devel] Death to Pointless Operators

Nicklas Avén nicklas.aven at jordogskog.no
Sun Dec 19 10:03:54 PST 2010


Hallo combatants :-)


> > Does it? And what means box equality?
> Hmm it looks like they deprecated the ~ operator in PostgreSQL 8.2 -- how
> did I miss that.
> http://www.postgresql.org/docs/8.4/interactive/functions-geometry.html
> 
> And they used ti to mean contains 
> 
>  ~= means sames as.
> http://www.postgresql.org/docs/8.1/interactive/functions-geometry.html  


Yes, this operator thing is very confusing.

Actually I think you are discussing the wrong operator here.

The one that changed behaviour between 1.4 to 1.5 from equality of
geometry to equality of bbox is not '~' as you are discussing but '~='
http://postgis.org/news/20100204/

So, Regina is right. What I pointed out here:
http://trac.osgeo.org/postgis/ticket/253#comment:31

is that '~=' oerator in postgresql means the same as the old 1.4 version
in PostGIS, equality in geometry, the same as ST_Equals.

In Postgresql doc it can be found here:
http://www.postgresql.org/docs/8.4/static/functions-geometry.html

So, forget about ~ which according to PostGIS doc
http://postgis.org/documentation/manual-1.5/ST_Geometry_Contain.html
means bbox of A contains bbox of B


I haven't followed every argument in this combat, but if there is no
very good reasons I agree that we should get rid of '~=' for the reason
Regina is giving that it might give bugs that will not show for a long
time when people are reusing code after upgrading.

About the other operators I have no opinion since I have never used
them, but there is a lot of PostGIS functions I have never used so that
is no argument from my side.

Regards

Nicklas




More information about the postgis-devel mailing list