When using heroku addons:create you can specify a version, for example. as shown in this This is a Heroku blog post representing Postgres 9.5:
heroku addons:create
heroku addons:create heroku-postgresql --version=9.5
{ "addons": [ { "plan": "heroku-postgresql", "options": { "version": "9.5" } } ] }
https://devcenter.heroku.com/articles/app-json-schema#example-app-json