PostGIS  2.2.7dev-r@@SVN_REVISION@@
Datum pgis_geometry_makeline_finalfn ( PG_FUNCTION_ARGS  )

Definition at line 291 of file lwgeom_accum.c.

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

292 {
293  pgis_abs *p;
294  Datum result = 0;
295  Datum geometry_array = 0;
296 
297  if (PG_ARGISNULL(0))
298  PG_RETURN_NULL(); /* returns null iff no input values */
299 
300  p = (pgis_abs*) PG_GETARG_POINTER(0);
301 
302  geometry_array = pgis_accum_finalfn(p, CurrentMemoryContext, fcinfo);
303  result = PGISDirectFunctionCall1( LWGEOM_makeline_garray, geometry_array );
304  if (!result)
305  PG_RETURN_NULL();
306 
307  PG_RETURN_DATUM(result);
308 }
Datum pgis_accum_finalfn(pgis_abs *p, MemoryContext mctx, FunctionCallInfo fcinfo)
The final function rescues the built array from the side memory context using the PostgreSQL built-in...
Definition: lwgeom_accum.c:168
Datum LWGEOM_makeline_garray(PG_FUNCTION_ARGS)
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:370
To pass the internal ArrayBuildState pointer between the transfn and finalfn we need to wrap it into ...
Definition: lwgeom_accum.c:69

Here is the call graph for this function: