[postgis-devel] [PostGIS] #536: Get rid of the STRICT on geography ST_Intersects

PostGIS trac at osgeo.org
Tue Jun 8 10:36:09 PDT 2010


#536: Get rid of the STRICT on geography ST_Intersects
----------------------+-----------------------------------------------------
  Reporter:  robe     |       Owner:  pramsey      
      Type:  defect   |      Status:  new          
  Priority:  high     |   Milestone:  PostGIS 1.5.2
 Component:  postgis  |     Version:  1.5.X        
Resolution:           |    Keywords:               
----------------------+-----------------------------------------------------
Comment (by anarazel):

 Looking in the code the problem lies in the 'AND' in
 {{{
  'SELECT $1 && $2 AND _ST_Intersects($1,$2)'
 }}}

 "contain_nonstrict_functions" (in clauses.c) considers *all* boolean
 expressions as being fundamentally nonstrict.....

 {{{
         if (IsA(node, BoolExpr))
         {
                 BoolExpr   *expr = (BoolExpr *) node;

                 switch (expr->boolop)
                 {
                         case AND_EXPR:
                         case OR_EXPR:
                                 /* AND, OR are inherently non-strict */
                                 return true;
                         default:
                                 break;
                 }
         }
 }}}
 Why OR is a good qualification for that is pretty clear (SELECT NULL OR
 TRUE), but why AND as well I cannot see right now.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/536#comment:18>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list