PostGIS  2.1.10dev-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 287 of file lwgeom_accum.c.

References result.

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

288 {
289  FunctionCallInfoData fcinfo;
290  Datum result;
291 
292 #if POSTGIS_PGSQL_VERSION > 90
293 
294  InitFunctionCallInfoData(fcinfo, NULL, 1, InvalidOid, NULL, NULL);
295 #else
296 
297  InitFunctionCallInfoData(fcinfo, NULL, 1, NULL, NULL);
298 #endif
299 
300  fcinfo.arg[0] = arg1;
301  fcinfo.argnull[0] = false;
302 
303  result = (*func) (&fcinfo);
304 
305  /* Check for null result, returning a "NULL" Datum if indicated */
306  if (fcinfo.isnull)
307  return (Datum) 0;
308 
309  return result;
310 }
char ** result
Definition: liblwgeom.h:218

Here is the caller graph for this function: