Replaced sql with pg for Heroku