```r
query<-"drop schema if exists volcanoes cascade;create schema volcanoes"
dbSendQuery(conn,query)
```

```
## <PostgreSQLResult>
```

```r
srid<-3857
db<-"gis_course"
path<-"rasters/volcanoes"
nms<-dir(path, pattern="tif")

fls<-paste(path, nms,sep="/")
tbls<-paste("volcanoes",gsub(".tif", "", nms),sep=".")


for(i in 1:length(fls))
{
com<-sprintf("PGPASSWORD=gis_course123 raster2pgsql -d -s %s %s %s | PGPASSWORD=gis_course123 psql -h postgis -U gis_course -d %s",srid,fls[i],tbls[i],db)
system(com)
}
```