PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ PGISDirectFunctionCall2()

Datum PGISDirectFunctionCall2 ( PGFunction  func,
Datum  arg1,
Datum  arg2 
)

A modified version of PostgreSQL's DirectFunctionCall2 which allows NULL results; this is required for aggregates that return NULL.

Definition at line 391 of file lwgeom_accum.c.

392 {
393  LOCAL_FCINFO(fcinfo, 2);
394  Datum result;
395 
396  InitFunctionCallInfoData(*fcinfo, NULL, 2, InvalidOid, NULL, NULL);
397 
398  fcinfo->args[0].value = arg1;
399  fcinfo->args[1].value = arg2;
400  fcinfo->args[0].isnull = false;
401  fcinfo->args[1].isnull = false;
402 
403  result = (*func)(fcinfo);
404 
405  /* Check for null result, returning a "NULL" Datum if indicated */
406  if (fcinfo->isnull)
407  return (Datum)0;
408 
409  return result;
410 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:262

References result.

Referenced by pgis_geometry_clusterwithin_finalfn().

Here is the caller graph for this function: