[PostGIS] #5601: A ST_Intersect row is missed when using JOIN.

PostGIS trac at osgeo.org
Tue Oct 31 18:58:37 PDT 2023


#5601: A ST_Intersect row is missed when using JOIN.
-----------------------+--------------------------
  Reporter:  Wenjing   |      Owner:  pramsey
      Type:  defect    |     Status:  new
  Priority:  critical  |  Milestone:  PostGIS GEOS
 Component:  postgis   |    Version:  3.4.x
Resolution:            |   Keywords:
-----------------------+--------------------------
Comment (by Wenjing):

 Emmm, I am curious about why
 {{{
 SELECT ST_Intersects(a1, a2) FROM t As a1, t As a2 WHERE a1.id = 2 and
 a2.id = 3;
 --{t}
 }}}
 gives the correct answer but
 {{{
 SELECT COUNT(*) FROM t As a1 JOIN t As a2 ON ST_Intersects(a1.geom,
 a2.geom)  WHERE a1.id <> a2.id;
 --{5}
 }}}
 gives the wrong one in this version.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5601#comment:8>
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-tickets mailing list