PostGIS  2.3.8dev-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 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 #if POSTGIS_PGSQL_VERSION > 90
390 
391  InitFunctionCallInfoData(fcinfo, NULL, 1, InvalidOid, NULL, NULL);
392 #else
393 
394  InitFunctionCallInfoData(fcinfo, NULL, 1, NULL, NULL);
395 #endif
396 
397  fcinfo.arg[0] = arg1;
398  fcinfo.argnull[0] = false;
399 
400  result = (*func) (&fcinfo);
401 
402  /* Check for null result, returning a "NULL" Datum if indicated */
403  if (fcinfo.isnull)
404  return (Datum) 0;
405 
406  return result;
407 }
Here is the caller graph for this function: