Try without psql -c ...