[PostGIS] #5938: ST_Relate(geom, geom, pattern) inconsistent

PostGIS trac at osgeo.org
Fri Jul 4 14:33:55 PDT 2025


#5938: ST_Relate(geom, geom, pattern) inconsistent
---------------------+---------------------------
 Reporter:  pramsey  |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 3.5.4
Component:  postgis  |    Version:  3.5.x
 Keywords:           |
---------------------+---------------------------
 When used in the context of multiple return records, returns different
 results than in a single record return. Likely a caching issue. The relate
 pattern does not show the same instability.
 {{{
 SELECT
  c.name AS city_name,
  s.name AS state_name,
  ST_Relate(c.point, s.poly),
  ST_Relate(c.point, s.poly, 'T*F**F***') AS matches_mask
 FROM City c
 CROSS JOIN State s;

  city_name | state_name | st_relate | matches_mask
 -----------+------------+-----------+--------------
  Houston   | Kansas     | FF0FFF212 | f
  Lawrence  | Kansas     | 0FFFFF212 | f


 SELECT
  c.name AS city_name,
  s.name AS state_name,
  ST_Relate(c.point, s.poly),
  ST_Relate(c.point, s.poly, 'T*F**F***') AS matches_mask
 FROM City c
 CROSS JOIN State s
 WHERE c.name = 'Lawrence';

  city_name | state_name | st_relate | matches_mask
 -----------+------------+-----------+--------------
  Lawrence  | Kansas     | 0FFFFF212 | t
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5938>
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