PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ pgis_geometry_union_finalfn()

Datum pgis_geometry_union_finalfn ( PG_FUNCTION_ARGS  )

Definition at line 231 of file lwgeom_accum.c.

232 {
233  pgis_abs *p;
234  Datum result = 0;
235  Datum geometry_array = 0;
236 
237  if (PG_ARGISNULL(0))
238  PG_RETURN_NULL(); /* returns null iff no input values */
239 
240  p = (pgis_abs*) PG_GETARG_POINTER(0);
241 
242  geometry_array = pgis_accum_finalfn(p, CurrentMemoryContext, fcinfo);
243  result = PGISDirectFunctionCall1( pgis_union_geometry_array, geometry_array );
244  if (!result)
245  PG_RETURN_NULL();
246 
247  PG_RETURN_DATUM(result);
248 }
Datum pgis_accum_finalfn(pgis_abs *p, MemoryContext mctx, FunctionCallInfo fcinfo)
Datum PGISDirectFunctionCall1(PGFunction func, Datum arg1)
A modified version of PostgreSQL's DirectFunctionCall1 which allows NULL results; this is required fo...
Definition: lwgeom_accum.c:386
Datum pgis_union_geometry_array(PG_FUNCTION_ARGS)
To pass the internal ArrayBuildState pointer between the transfn and finalfn we need to wrap it into ...
Definition: lwgeom_accum.c:108

References pgis_accum_finalfn(), pgis_union_geometry_array(), and PGISDirectFunctionCall1().

Here is the call graph for this function: