[postgis-commits] svn - r3806 - trunk/postgis
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Sun Mar 8 10:00:55 PDT 2009
Author: mcayland
Date: 2009-03-08 10:00:54 -0700 (Sun, 08 Mar 2009)
New Revision: 3806
Modified:
trunk/postgis/lwgeom_accum.c
Log:
Add some explanation comments to lwgeom_accum.c explaining why we need to implement our own set of geometry aggregate functions.
Modified: trunk/postgis/lwgeom_accum.c
===================================================================
--- trunk/postgis/lwgeom_accum.c 2009-03-08 16:36:20 UTC (rev 3805)
+++ trunk/postgis/lwgeom_accum.c 2009-03-08 17:00:54 UTC (rev 3806)
@@ -36,7 +36,20 @@
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,
** the pgis_abs type in our case.
More information about the postgis-commits
mailing list