[postgis-tickets] [PostGIS] #3764: PostGIS topology failures on PostgreSQL 10

PostGIS trac at osgeo.org
Fri May 26 01:46:39 PDT 2017


#3764: PostGIS topology failures on PostgreSQL 10
-----------------------+---------------------------
  Reporter:  robe      |      Owner:  robe
      Type:  defect    |     Status:  assigned
  Priority:  blocker   |  Milestone:  PostGIS 2.4.0
 Component:  topology  |    Version:  trunk
Resolution:            |   Keywords:
-----------------------+---------------------------

Comment (by robe):

 Okay did some checking.  I think topology is suffering from the same issue
 as what raster was.  namely the CASE WHEN set returning behavior changes
 in PostgreSQL 10.  I think I isolated the issue to the
 topology.totopogeom(
     ageom geometry,
     tg topogeometry,
     atolerance double precision DEFAULT 0) function, there is a case
 statement that uses set returning function topogeo_addpolygon.


 {{{
  FOR rec2 IN SELECT CASE
        WHEN rec.dims = 0 THEN
          topology.topogeo_addPoint(atopology, rec.geom, tolerance)
        WHEN rec.dims = 1 THEN
          topology.topogeo_addLineString(atopology, rec.geom, tolerance)
        WHEN rec.dims = 2 THEN
          topology.topogeo_addPolygon(atopology, rec.geom, tolerance)
        END as primitive
     LOOP
 }}}


 What I discovered was the SRF gets called even if the condition is not
 met.

 I by the way did end up complaining about this because though it is sorta
 documented in the release notes, it seems counter intuitive in that it
 behaves differently with constants.

 https://www.postgresql.org/message-
 id/000001d2d5de%24d8d66170%248a832450%24%40pcorp.us

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3764#comment:4>
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