PostGIS  2.5.0dev-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 360 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().

361 {
362  FunctionCallInfoData fcinfo;
363  Datum result;
364 
365 
366  InitFunctionCallInfoData(fcinfo, NULL, 1, InvalidOid, NULL, NULL);
367 
368 
369  fcinfo.arg[0] = arg1;
370  fcinfo.argnull[0] = false;
371 
372  result = (*func) (&fcinfo);
373 
374  /* Check for null result, returning a "NULL" Datum if indicated */
375  if (fcinfo.isnull)
376  return (Datum) 0;
377 
378  return result;
379 }
Here is the caller graph for this function: