646 bool boot_postgis_enable_outdb_rasters =
false;
647 MemoryContext old_context;
653 old_context = MemoryContextSwitchTo(TopMemoryContext);
672 "boot_postgis_gdal_enabled_drivers = %s",
686 elog(ERROR,
"_PG_init: Cannot process environmental variable: POSTGIS_ENABLE_OUTDB_RASTERS");
690 if (strcmp(env,
"1") == 0)
691 boot_postgis_enable_outdb_rasters =
true;
698 "boot_postgis_enable_outdb_rasters = %s",
699 boot_postgis_enable_outdb_rasters ?
"TRUE" :
"FALSE"
703 pg_install_lwgeom_handlers();
711 if ( postgis_guc_find_option(
"postgis.gdal_datapath") )
716 elog(WARNING,
"'%s' is already set and cannot be changed until you reconnect",
"postgis.gdal_datapath");
720 DefineCustomStringVariable(
721 "postgis.gdal_datapath",
722 "Path to GDAL data files.",
723 "Physical path to directory containing GDAL data files (sets the GDAL_DATA config option).",
734 if ( postgis_guc_find_option(
"postgis.gdal_enabled_drivers") )
739 elog(WARNING,
"'%s' is already set and cannot be changed until you reconnect",
"postgis.gdal_enabled_drivers");
743 DefineCustomStringVariable(
744 "postgis.gdal_enabled_drivers",
745 "Enabled GDAL drivers.",
746 "List of enabled GDAL drivers by short name. To enable/disable all drivers, use 'ENABLE_ALL' or 'DISABLE_ALL' (sets the GDAL_SKIP config option).",
757 if ( postgis_guc_find_option(
"postgis.enable_outdb_rasters") )
762 elog(WARNING,
"'%s' is already set and cannot be changed until you reconnect",
"postgis.enable_outdb_rasters");
766 DefineCustomBoolVariable(
767 "postgis.enable_outdb_rasters",
768 "Enable Out-DB raster bands",
769 "If true, rasters can access data located outside the database",
771 boot_postgis_enable_outdb_rasters,
780 if ( postgis_guc_find_option(
"postgis.gdal_vsi_options") )
782 elog(WARNING,
"'%s' is already set and cannot be changed until you reconnect",
"postgis.gdal_vsi_options");
786 DefineCustomStringVariable(
787 "postgis.gdal_vsi_options",
788 "VSI config options",
789 "Set the config options to be used when opening /vsi/ network files",
801 MemoryContextSwitchTo(old_context);
void rt_set_handlers_options(rt_allocator allocator, rt_reallocator reallocator, rt_deallocator deallocator, rt_message_handler error_handler, rt_message_handler info_handler, rt_message_handler warning_handler, rt_options options_handler)
char * rtpg_trim(const char *input)
static char * rt_pg_options(const char *varname)
static char * env_postgis_enable_outdb_rasters
static void * rt_pg_alloc(size_t size)
static char * gdal_vsi_options
static void rtpg_assignHookGDALDataPath(const char *newpath, void *extra)
static void rt_pg_error(const char *fmt, va_list ap) __attribute__((format(printf
static bool enable_outdb_rasters
static void rt_pg_notice(const char *fmt, va_list ap) __attribute__((format(printf
static bool rt_pg_vsi_check_options(char **newval, void **extra, GucSource source)
static char * env_postgis_gdal_enabled_drivers
static char * boot_postgis_gdal_enabled_drivers
static void rtpg_assignHookGDALEnabledDrivers(const char *enabled_drivers, void *extra)
static void * rt_pg_realloc(void *mem, size_t size)
static void rt_pg_free(void *ptr)
static char * gdal_enabled_drivers
static void rtpg_assignHookEnableOutDBRasters(bool enable, void *extra)
static void rt_pg_debug(const char *fmt, va_list ap) __attribute__((format(printf
static char * gdal_datapath
#define POSTGIS_RT_DEBUGF(level, msg,...)