32 #include <utils/builtins.h> 34 #include "../../postgis_config.h" 35 #include "lwgeom_pg.h" 53 result = cstring2text(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 = cstring2text(ver);
81 sprintf(rtn,
"%s GDAL_DATA not found", ver);
82 result = cstring2text(rtn);
87 result = cstring2text(ver);
89 PG_RETURN_POINTER(result);
95 text *pixeltypetext = NULL;
96 char *pixeltypechar = NULL;
103 pixeltypetext = PG_GETARG_TEXT_P(0);
104 pixeltypechar = text_to_cstring(pixeltypetext);
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);
Datum RASTER_lib_version(PG_FUNCTION_ARGS)
#define POSTGIS_LIB_VERSION
PG_FUNCTION_INFO_V1(RASTER_lib_version)
Datum RASTER_minPossibleValue(PG_FUNCTION_ARGS)
rt_pixtype rt_pixtype_index_from_name(const char *pixname)
double rt_pixtype_get_min_value(rt_pixtype pixtype)
Return minimum value possible for pixel type.
Datum RASTER_lib_build_date(PG_FUNCTION_ARGS)
Datum RASTER_memsize(PG_FUNCTION_ARGS)
find the detoasted size of a value
int rt_util_gdal_configured(void)
const char * rt_util_gdal_version(const char *request)
Datum RASTER_gdal_version(PG_FUNCTION_ARGS)