[GIS] Using PostGIS 2.1, getting “Could not load the output GDAL driver”

gdalpostgispostgresqlraster

I have problem of loading GDAL in PostGIS

SET postgis.gdal_enabled_drivers = 'ENABLE_ALL';

After running

ALTER DATABASE "OME"
  SET postgis.gdal_enabled_drivers
  TO 'GTiff PNG JPEG';`  

I still have an error:

rt_raster_to_gdal: Could not load the output GDAL driver

Note that command gdalinfo works. Here is the result executing postgis_full_version() in pgadmin:

POSTGIS="2.1.7 r13414" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0,
6 March 2012" GDAL="GDAL 1.11.1, released 2014/09/24 GDAL_DATA not
found" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER

Best Answer

Run this SQL command:

SET postgis.gdal_enabled_drivers = 'ENABLE_ALL';