[postgis-devel] pgis_geometry_accum_transfn mon amour

Paul Ramsey pramsey at cleverelephant.ca
Wed Feb 12 13:57:33 PST 2020


They are all used, by different aggregates. 
For example, see
CREATE AGGREGATE ST_ClusterWithin (geometry, float8) which uses the geometry,float version
compared with
CREATE AGGREGATE ST_ClusterIntersecting (geometry) which uses the geometry only version
In an ideal world, aggregates would accept default parameters, and could pass those defaults down to transfer functions, but we do not live in such a world, so we have to support all the variants.
P.

> On Feb 12, 2020, at 12:00 PM, Sandro Santilli <strk at kbt.io> wrote:
> 
> I see in postgis.sql.in that we have 3 signatures defined
> for the pgis_geometry_accum_transfn function, which is used
> in aggregates:
> 
>  -- Availability: 1.4.0
>  -- Changed: 2.5.0 use 'internal' transfer type
>  CREATE OR REPLACE FUNCTION pgis_geometry_accum_transfn(internal, geometry)
>  [...]
> 
>  -- Availability: 2.2
>  -- Changed: 2.5.0 use 'internal' transfer type
>  CREATE OR REPLACE FUNCTION pgis_geometry_accum_transfn(internal, geometry, float8)
>  [...]
> 
>  -- Availability: 2.3
>  -- Changed: 2.5.0 use 'internal' transfer type
>  CREATE OR REPLACE FUNCTION pgis_geometry_accum_transfn(internal, geometry, float8, int)
>  [...]
> 
> Which one(s?) are going to be used by the AGGREGATES ? Do we really
> need 3 of them ?
> 
> --strk;
> _______________________________________________
> 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