I want to store an elevation raster in a postgis database. However a problem occurs. I use the following command:
raster2pgsql -I -C -e -Y -F -s 4326 -t auto dem.tif schemaname.filename | psql -U blabla -d blabla -h localhost -p 5432
As long as I put the raster in the public schema, the command works properly. But when I change the schema name to some other database schema I have created, the command just returns ERROR: schema "schemaname" does not exist.
Do I overlook something?
Edit: the full error looks like this:
ERROR: schema "schemaname" does not exist
ERROR: schema "schemaname" does not exist
invalid command \.
ERROR: syntax error at or near "0100000100"
LINE 1: 0100000100B5EDD83C22BEF33E0CC0E6158FFAF2BE5981483035A34FC08E...
^
ERROR: schema "schemaname" does not exist
ERROR: The value provided for schema is invalid
CONTEXT: PL/pgSQL function addrasterconstraints(name,name,name,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean) line 53 at RETURN