]> granicus.if.org Git - postgis/commitdiff
#3480, copy input geometries to ST_ClusterDBSCAN
authorDaniel Baston <dbaston@gmail.com>
Fri, 4 Mar 2016 14:51:36 +0000 (14:51 +0000)
committerDaniel Baston <dbaston@gmail.com>
Fri, 4 Mar 2016 14:51:36 +0000 (14:51 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@14745 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_window.c

index 779cd472dfb5a5b0abd9e53102f561bd5a209c56..5d02a364f3654db1b98b01b2ff64985e8764d07b 100644 (file)
@@ -69,13 +69,13 @@ read_lwgeom_from_partition(WindowObject win_obj, uint32_t i, bool* is_null)
 
        if (*is_null) {
                /* So that the indexes in our clustering input array can match our partition positions,
-                *               * toss an empty point into the clustering inputs, as a pass-through.
-                *                               * NOTE: this will cause gaps in the output cluster id sequence.
-                                                                * */
+                * toss an empty point into the clustering inputs, as a pass-through.
+                * NOTE: this will cause gaps in the output cluster id sequence.
+                * */
                return lwpoint_as_lwgeom(lwpoint_construct_empty(0, 0, 0));
        }
 
-       g = (GSERIALIZED*) PG_DETOAST_DATUM(arg);
+       g = (GSERIALIZED*) PG_DETOAST_DATUM_COPY(arg);
        return lwgeom_from_gserialized(g);
 }