PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ pgis_geometry_collect_finalfn()

Datum pgis_geometry_collect_finalfn ( PG_FUNCTION_ARGS  )

Definition at line 256 of file lwgeom_accum.c.

257 {
258  pgis_abs *p;
259  Datum result = 0;
260  Datum geometry_array = 0;
261 
262  if (PG_ARGISNULL(0))
263  PG_RETURN_NULL(); /* returns null iff no input values */
264 
265  p = (pgis_abs*) PG_GETARG_POINTER(0);
266 
267  geometry_array = pgis_accum_finalfn(p, CurrentMemoryContext, fcinfo);
268  result = PGISDirectFunctionCall1( LWGEOM_collect_garray, geometry_array );
269  if (!result)
270  PG_RETURN_NULL();
271 
272  PG_RETURN_DATUM(result);
273 }
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 LWGEOM_collect_garray(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 LWGEOM_collect_garray(), pgis_accum_finalfn(), and PGISDirectFunctionCall1().

Here is the call graph for this function: