Categories
Python

Django on Heroku: Postgres and dbshell

If you’re deploying a Django app on Heroku you should already know that Heroku uses Postgres. The surprise comes when your “dbshell” command will fail with an error message like:

You appear not to have the ‘psql’ program installed or on your path.

The workaround is rather simple, you have to copy the SQL manually and run it from the heroku pgsql console. To run the console, type in –

And you should get a prompt to type in your pgsql queries. Type in your SQL and commit. It should work! 🙂