PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ RASTER_gdal_version()

Datum RASTER_gdal_version ( PG_FUNCTION_ARGS  )

Definition at line 69 of file rtpg_utility.c.

References PG_FUNCTION_INFO_V1(), RASTER_minPossibleValue(), rt_util_gdal_configured(), and rt_util_gdal_version().

Referenced by RASTER_lib_build_date().

70 {
71  const char *ver = rt_util_gdal_version("--version");
72  text *result;
73 
74  /* add indicator if GDAL isn't configured right */
75  if (!rt_util_gdal_configured()) {
76  char *rtn = NULL;
77  rtn = palloc(strlen(ver) + strlen(" GDAL_DATA not found") + 1);
78  if (!rtn)
79  result = cstring2text(ver);
80  else {
81  sprintf(rtn, "%s GDAL_DATA not found", ver);
82  result = cstring2text(rtn);
83  pfree(rtn);
84  }
85  }
86  else
87  result = cstring2text(ver);
88 
89  PG_RETURN_POINTER(result);
90 }
int rt_util_gdal_configured(void)
Definition: rt_util.c:313
const char * rt_util_gdal_version(const char *request)
Definition: rt_util.c:180
Here is the call graph for this function:
Here is the caller graph for this function: