I have import a raster into my postGIS database via raster2pgsql. My raster tiled to 100x100. Now I'm trying to export (output) the raster to GDAL supported file (for example: PNG).
Following the instruction in postGIS manual dev 2.1 (page 68). However, I don't get any output file in destination folder.
Here's what I type in SQL tool in pgAdmin III
<!-- language: lang-sql --> SELECT lo_export(demo.oid,'D:\demo_rast.png') FROM (SELECT oid, lowrite(lo_open(oid, 131072), png) AS num_bytes FROM ( VALUES (lo_create(0), ST_AsPNG( (SELECT rast FROM landsat WHERE rid=1)))) AS v(oid,png)) AS demo WHERE demo.oid = 1 WHERE demo.oid = 1