[postgis-devel] assumptions of &&& operator for missing dimensions

Sandro Santilli strk at keybit.net
Thu Feb 19 08:46:18 PST 2015


The current &&& operator assumes 0 as the value of dimensions that are
missing from one of the operands.

This results in confusing behavior, like this:

 select 'POINT(0 0)'::geometry &&& 'POINT(0 0 1)'::geometry; -- false
 select 'POINT(0 0)'::geometry &&& 'POINT(0 0 0)'::geometry; -- true

I think the above two selects should give the same answer instead.
Possibilities are:

 1. Missing dimension is unknown, return NULL
 2. Missing dimension is infinite, return true
 3. Missing dimension is empty, return false
 4. An impossible comparison was requested, raise exception

Which one would you prefer ?
And what constraints do we have being the operator used by index scan ?

--strk; 

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



More information about the postgis-devel mailing list