[postgis-devel] Aggregate STYPE

Regina Obe lr at pcorp.us
Fri Mar 2 18:12:43 PST 2018


Only recollection I have is you created that so we could take advantage of the fast array aggregation that became a thing at the time.

So it was just a copy of what the new array_accum did.  At the time you did it, the array_accum new fast agg feature wasn't in existence in all postgresql we supported (e.g. it was still dong memcopy and incrementally increasing the array size instead of building the array big enough first or something like that), so you copied some of the logic from postgresql itself.

But to be honest, I don't know the internals of why I just noticed the 1000 times faster aggregation of arrays :)



-----Original Message-----
From: postgis-devel [mailto:postgis-devel-bounces at lists.osgeo.org] On Behalf Of Paul Ramsey
Sent: Friday, March 02, 2018 5:52 PM
To: PostGIS Development Discussion <postgis-devel at lists.osgeo.org>
Subject: [postgis-devel] Aggregate STYPE

Memory test, ancient developers:

The CREATE AGGREGATE for ST_Union has

   stype = pgis_abs

The CREATE AGGREGATE for ST_AsMVT has

   stype = internal

Now, pgis_abs is just a stub type, it's not real at all, the input/output functions don't do anything, etc. So, is the retention of that type an echo of an earlier time when it wasn't possible to aggregate with an internal stype, or is there an *extra* reason why we don't just use stype=internal for ST_Union()?

P.
_______________________________________________
postgis-devel mailing list
postgis-devel at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list