I have done that many times and it usually works but I'm facing a problem now that I do not understand. I'm trying to load a raster (.tif) with a EPSG4326 and it is a one band file in my database from the windows command prompt. I use the following function:
raster2pgsql -s 4326 -I -C -M -R climat.tif -F -t 25x25 clim.climat | psql -h localhost -U postgres -d biotic_interactions
it seems at first glance that it is working as I get 0 and 1 inserted and that my new table appears in pgAdmin. However, when I open it in QGIS and I confront the table that I just imported to the initial raster I see the value of the pixels are not the same than in the original file. Also, I noticed that while importing the raster, I get a few NOTICE:
return error message: numeric field overflow unable to add constraint: nodata_values unable to add constraint: enforce_nodata_values_Rast
I'm using PostgreSQL 9.4.