I\'m trying to pull a heroku database to my local Windows computer by using
heroku pg:pull HEROKU_POSTGRESQL_DATABASE mydatabase --app myapp
<
I realize this is from months ago, but I'll answer in hopes of helping somebody else. You need to set your path variables. My Computer > Advanced system settings; Click on "Environment variables" and then look at "System variables". Scroll down to "Path" or "PATH", edit it, and go to the very end of the text box. Add ;C:\Program Files (x86)\PostgreSQL\9.3\bin and ;C:\Program Files (x86)\PostgreSQL\9.3\lib (or whatever your equivalent paths are for bin and lib). Restart your command prompt and it should work. :)
I believe the answer given here is really inaccurate so I will answer:
See, when there is an error such as "'env' is not recognized as an internal or external command, operable program or batch file" it means that the system is trying to execute a command named env. This has nothing to do at all with setting up your environment variables.
Env is not a command in windows, but in unix. I understand that you have a windows machine though. What you can do is run "git bash". (You could get it by itself but it comes with Heroku's CLI).
This gives you a unix-like environment where the "env" command is supported, and then you can run the actual heroku pg:pull command :)
I hope this helps!