I have a .sql file with a bunch of insert commands that I want to execute on my postgres database on heroku. But I don\'t know how to do it:-
If I had access to post
Why not just use psql?
If you look at the output of heroku config
you will see the database URLs (DATABASE_URL key) your application is using - if you take this and break them apart in to the correct bits for using with the psql
all will be good.
eg
DATABASE_URL: postgres://username:password@host:port/dbname
becomes
psql -h host -p port -d dbname -U username -f datafile.sql