]> granicus.if.org Git - postgis/commitdiff
Add some explanation comments to lwgeom_accum.c explaining why we need to implement...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sun, 8 Mar 2009 17:00:54 +0000 (17:00 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sun, 8 Mar 2009 17:00:54 +0000 (17:00 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3806 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_accum.c

index fab4bbdfd8321d74244b2cd400c7167b0d94220e..4177eab1ca72c017403f8dabb1f6bdb96e98abd3 100644 (file)
@@ -36,6 +36,19 @@ Datum LWGEOM_collect_garray(PG_FUNCTION_ARGS);
 Datum polygonize_garray(PG_FUNCTION_ARGS);
 Datum LWGEOM_makeline_garray(PG_FUNCTION_ARGS);
 
+
+/*
+** Versions of PostgreSQL < 8.4 perform array accumulation internally using 
+** pass by value, which is very slow working with large/many geometries.
+** Hence PostGIS currently implements its own aggregate for building
+** geometry arrays using pass by reference, which is significantly faster and
+** similar to the method used in PostgreSQL 8.4.
+**
+** Hence we can revert this to the original aggregate functions from 1.3 at
+** whatever point PostgreSQL 8.4 becomes the minimum version we support :) 
+*/
+
+
 /*
 ** To pass the internal ArrayBuildState pointer between the 
 ** transfn and finalfn we need to wrap it into a custom type first,