PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ RASTER_gdal_version()

Datum RASTER_gdal_version ( PG_FUNCTION_ARGS  )

Definition at line 72 of file rtpg_utility.c.

73{
74 const char *ver = rt_util_gdal_version("--version");
75 text *result;
76
77 /* add indicator if GDAL isn't configured right */
79 char *rtn = NULL;
80 size_t sz = strlen(ver) + strlen(" GDAL_DATA not found") + 1;
81 rtn = palloc(sz);
82 if (!rtn)
83 result = cstring_to_text(ver);
84 else {
85 snprintf(rtn, sz, "%s GDAL_DATA not found", ver);
86 result = cstring_to_text(rtn);
87 pfree(rtn);
88 }
89 }
90 else
91 result = cstring_to_text(ver);
92
93 PG_RETURN_POINTER(result);
94}
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition cu_print.c:267
int rt_util_gdal_configured(void)
Definition rt_util.c:425
const char * rt_util_gdal_version(const char *request)
Definition rt_util.c:290

References result, rt_util_gdal_configured(), and rt_util_gdal_version().

Here is the call graph for this function: