PostGIS  2.1.10dev-r@@SVN_REVISION@@
void _PG_init ( void  )

Definition at line 333 of file rt_pg.c.

References enable_outdb_rasters, ENV_POSTGIS_ENABLE_OUTDB_RASTERS, rt_pg_alloc(), rt_pg_error(), rt_pg_free(), rt_pg_notice(), rt_pg_realloc(), rt_set_handlers(), rtpg_assignHookGDALEnabledDrivers(), and rtpg_trim().

333  {
334  char *env_postgis_enable_outdb_rasters = NULL;
335 
336  /* Install liblwgeom handlers */
337  pg_install_lwgeom_handlers();
338 
339  /* Install rt_api handlers */
341 
342  /*
343  * use POSTGIS_ENABLE_OUTDB_RASTERS to enable access to out-db rasters
344  */
346  env_postgis_enable_outdb_rasters = getenv(ENV_POSTGIS_ENABLE_OUTDB_RASTERS);
347  if (env_postgis_enable_outdb_rasters != NULL) {
348  char *env = rtpg_trim(env_postgis_enable_outdb_rasters);
349 
350  /* out of memory */
351  if (env == NULL) {
352  elog(
353  ERROR,
354  "_PG_init: Cannot process environmental variable: %s",
356  );
357  return;
358  }
359 
360  if (strcmp(env, "1") == 0)
362 
363  pfree(env);
364  }
365 
366  /*
367  * use POSTGIS_GDAL_ENABLED_DRIVERS to restrict drivers
368  */
370 
371 }
#define ENV_POSTGIS_ENABLE_OUTDB_RASTERS
Definition: rt_pg.c:96
char enable_outdb_rasters
Definition: rt_api.c:1727
static char * rtpg_trim(const char *input)
Definition: rt_pg.c:856
static void * rt_pg_alloc(size_t size)
Definition: rt_pg.c:104
void rt_set_handlers(rt_allocator allocator, rt_reallocator reallocator, rt_deallocator deallocator, rt_message_handler error_handler, rt_message_handler info_handler, rt_message_handler warning_handler)
This function is called when the PostgreSQL backend is taking care of the memory and we want to use p...
Definition: rt_api.c:846
static void rt_pg_free(void *ptr)
Definition: rt_pg.c:132
static void rtpg_assignHookGDALEnabledDrivers()
Definition: rt_pg.c:172
static void * rt_pg_realloc(void *mem, size_t size)
Definition: rt_pg.c:116
static void rt_pg_notice(const char *fmt, va_list ap)
Definition: rt_pg.c:152
static void rt_pg_error(const char *fmt, va_list ap)
Definition: rt_pg.c:139

Here is the call graph for this function: