[postgis-tickets] r14745 - #3480, copy input geometries to ST_ClusterDBSCAN

Daniel Baston dbaston at gmail.com
Fri Mar 4 06:51:36 PST 2016


Author: dbaston
Date: 2016-03-04 06:51:36 -0800 (Fri, 04 Mar 2016)
New Revision: 14745

Modified:
   trunk/postgis/lwgeom_window.c
Log:
#3480, copy input geometries to ST_ClusterDBSCAN

Modified: trunk/postgis/lwgeom_window.c
===================================================================
--- trunk/postgis/lwgeom_window.c	2016-03-04 08:29:45 UTC (rev 14744)
+++ trunk/postgis/lwgeom_window.c	2016-03-04 14:51:36 UTC (rev 14745)
@@ -69,13 +69,13 @@
 
 	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);
 }
 



More information about the postgis-tickets mailing list