PostGIS  2.5.0dev-r@@SVN_REVISION@@
Datum PGISDirectFunctionCall1 ( PGFunction  func,
Datum  arg1 
)

A modified version of PostgreSQL's DirectFunctionCall1 which allows NULL results; this is required for aggregates that return NULL.

Definition at line 384 of file lwgeom_accum.c.

Referenced by pgis_geometry_clusterintersecting_finalfn(), pgis_geometry_collect_finalfn(), pgis_geometry_makeline_finalfn(), pgis_geometry_polygonize_finalfn(), and pgis_geometry_union_finalfn().

385 {
386  FunctionCallInfoData fcinfo;
387  Datum result;
388 
389 
390  InitFunctionCallInfoData(fcinfo, NULL, 1, InvalidOid, NULL, NULL);
391 
392 
393  fcinfo.arg[0] = arg1;
394  fcinfo.argnull[0] = false;
395 
396  result = (*func) (&fcinfo);
397 
398  /* Check for null result, returning a "NULL" Datum if indicated */
399  if (fcinfo.isnull)
400  return (Datum) 0;
401 
402  return result;
403 }

Here is the caller graph for this function: