PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ PGISDirectFunctionCall1()

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 386 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().

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