PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ pgis_geometry_collect_finalfn()

Datum pgis_geometry_collect_finalfn ( PG_FUNCTION_ARGS  )

Definition at line 199 of file lwgeom_accum.c.

200 {
202  Datum result = 0;
203  Datum geometry_array = 0;
204 
205  if (PG_ARGISNULL(0))
206  PG_RETURN_NULL(); /* returns null iff no input values */
207 
208  p = (CollectionBuildState*) PG_GETARG_POINTER(0);
209 
210  geometry_array = pgis_accum_finalfn(p, CurrentMemoryContext, fcinfo);
211  result = PGISDirectFunctionCall1( LWGEOM_collect_garray, geometry_array );
212  if (!result)
213  PG_RETURN_NULL();
214 
215  PG_RETURN_DATUM(result);
216 }
Datum pgis_accum_finalfn(CollectionBuildState *state, 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:329
Datum LWGEOM_collect_garray(PG_FUNCTION_ARGS)

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

Here is the call graph for this function: