32 #include <utils/builtins.h>
34 #include "../../postgis_config.h"
35 #include "lwgeom_pg.h"
53 result = cstring_to_text(ver);
54 PG_RETURN_TEXT_P(result);
60 char *ver = POSTGIS_BUILD_DATE;
62 result = palloc(VARHDRSZ + strlen(ver));
63 SET_VARSIZE(result, VARHDRSZ + strlen(ver));
64 memcpy(VARDATA(result), ver, strlen(ver));
65 PG_RETURN_POINTER(result);
77 rtn = palloc(strlen(ver) + strlen(
" GDAL_DATA not found") + 1);
79 result = cstring_to_text(ver);
81 sprintf(rtn,
"%s GDAL_DATA not found", ver);
82 result = cstring_to_text(rtn);
87 result = cstring_to_text(ver);
89 PG_RETURN_POINTER(result);
95 text *pixeltypetext = NULL;
96 char *pixeltypechar = NULL;
103 pixeltypetext = PG_GETARG_TEXT_P(0);
108 elog(ERROR,
"RASTER_minPossibleValue: Invalid pixel type: %s", pixeltypechar);
132 PG_RETURN_FLOAT8(pixsize);
140 void *detoasted = PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
141 size_t size = VARSIZE(detoasted);
142 PG_FREE_IF_COPY(detoasted,0);
143 PG_RETURN_INT32(size);
int rt_util_gdal_configured(void)
rt_pixtype rt_pixtype_index_from_name(const char *pixname)
const char * rt_util_gdal_version(const char *request)
double rt_pixtype_get_min_value(rt_pixtype pixtype)
Return minimum value possible for pixel type.
char * text_to_cstring(const text *textptr)
Datum RASTER_lib_version(PG_FUNCTION_ARGS)
Datum RASTER_lib_build_date(PG_FUNCTION_ARGS)
PG_FUNCTION_INFO_V1(RASTER_lib_version)
Datum RASTER_minPossibleValue(PG_FUNCTION_ARGS)
Datum RASTER_gdal_version(PG_FUNCTION_ARGS)
Datum RASTER_memsize(PG_FUNCTION_ARGS)
find the detoasted size of a value
#define POSTGIS_LIB_VERSION