Code for GDAL PostGIS Raster driver