title: How do I run postgres on heroku for my discord.py bot?
body: <p>So I am using heroku (for now) to host my discord.py bot.
  Recently I started using postgres as a database, this is the connection code:</p>
  <p>I am using this code for connection:</p>
  <pre><code>import asyncpg
  
  async def create_db_pool():
      client.pg_con = await asyncpg.create_pool(DATABASE_URL) #db url goes here
  
  client.loop.run_until_complete(create_db_pool())
  client.run(TOKEN)
  </code></pre>
  <p>The code works absolutely fine when I run it locally, but shows connection error while I use heroku for the same.</p>
  <p>I also added 'Heroku-postgres' as an add-on but it still doesn't work?
  Please share a solution for the same.</p>
  <p>Thanks in advance :)</p>