PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ pgis_geometry_makeline_finalfn()

Datum pgis_geometry_makeline_finalfn ( PG_FUNCTION_ARGS  )

Definition at line 307 of file lwgeom_accum.c.

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

Referenced by pgis_geometry_polygonize_finalfn().

308 {
309  pgis_abs *p;
310  Datum result = 0;
311  Datum geometry_array = 0;
312 
313  if (PG_ARGISNULL(0))
314  PG_RETURN_NULL(); /* returns null iff no input values */
315 
316  p = (pgis_abs*) PG_GETARG_POINTER(0);
317 
318  geometry_array = pgis_accum_finalfn(p, CurrentMemoryContext, fcinfo);
319  result = PGISDirectFunctionCall1( LWGEOM_makeline_garray, geometry_array );
320  if (!result)
321  PG_RETURN_NULL();
322 
323  PG_RETURN_DATUM(result);
324 }
Datum pgis_accum_finalfn(pgis_abs *p, MemoryContext mctx, FunctionCallInfo fcinfo)
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:386
To pass the internal ArrayBuildState pointer between the transfn and finalfn we need to wrap it into ...
Definition: lwgeom_accum.c:107
Here is the call graph for this function:
Here is the caller graph for this function: