1

I was sucessfull when I used this mode to store Raster in Postgis (raster2pgsql.exe):

C: \ Program Files \ PostgreSQL \ 9.4 \ bin> Raster2pgsql.exe -s 32373 -I -C -M C: \ Users \ Geo \ Raster \ Stockpile.jp2 -F -t 100x100 Stockpile_MRM | Psql -U postgres -d GEOSURVEY -h 192.168.1.14 -p 5432

But it goes directly to the public schema. I used this mode to change the schema (schema_name.table), but it does not work. I saw in - http://postgis.net/docs/manual-2.2/using_raster_dataman.html, but nothing changes.

C: \ Program Files \ PostgreSQL \ 9.4 \ bin> Raster2pgsql.exe -s 32373 -I -C -M C: \ Users \ Geo \ Raster \ Stockpile.jp2 -F -t 100x100 BD_Maputo.Stockpile | Psql -U postgres -d GEOSURVEY -h 192.168.1.14 -p 5432

enter image description here

what i´m doing wrong here?

  • Did you try putting BD_Maputo.Stockpile between double quotes? – Pierre Racine Mar 2 '17 at 11:41
  • I did not! I will try ... – Paulo Martinho Mar 2 '17 at 11:48
2

I had the same problem, and adding double quotes didn't work for me. What solved it in the end was setting the schema search path for the whole database:

alter database <database_name> set search_path = <schema_name>,public

And then running raster2pgsql using <schema_name>.<table_name> to reference the table:

raster2pgsql.exe -s 32373 -I -C -M C: \ Users \ Geo \ Raster \ Stockpile.jp2 -F -t 100x100 BD_Maputo.Stockpile

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.