PostGIS  2.2.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 370 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().

371 {
372  FunctionCallInfoData fcinfo;
373  Datum result;
374 
375 #if POSTGIS_PGSQL_VERSION > 90
376 
377  InitFunctionCallInfoData(fcinfo, NULL, 1, InvalidOid, NULL, NULL);
378 #else
379 
380  InitFunctionCallInfoData(fcinfo, NULL, 1, NULL, NULL);
381 #endif
382 
383  fcinfo.arg[0] = arg1;
384  fcinfo.argnull[0] = false;
385 
386  result = (*func) (&fcinfo);
387 
388  /* Check for null result, returning a "NULL" Datum if indicated */
389  if (fcinfo.isnull)
390  return (Datum) 0;
391 
392  return result;
393 }
Here is the caller graph for this function: