PostGIS  2.5.0dev-r@@SVN_REVISION@@
Datum pgis_geometry_polygonize_finalfn ( PG_FUNCTION_ARGS  )

Definition at line 280 of file lwgeom_accum.c.

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

281 {
282  pgis_abs *p;
283  Datum result = 0;
284  Datum geometry_array = 0;
285 
286  if (PG_ARGISNULL(0))
287  PG_RETURN_NULL(); /* returns null iff no input values */
288 
289  p = (pgis_abs*) PG_GETARG_POINTER(0);
290 
291  geometry_array = pgis_accum_finalfn(p, CurrentMemoryContext, fcinfo);
292  result = PGISDirectFunctionCall1( polygonize_garray, geometry_array );
293  if (!result)
294  PG_RETURN_NULL();
295 
296  PG_RETURN_DATUM(result);
297 }
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:182
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:384
To pass the internal ArrayBuildState pointer between the transfn and finalfn we need to wrap it into ...
Definition: lwgeom_accum.c:83
Datum polygonize_garray(PG_FUNCTION_ARGS)

Here is the call graph for this function: