You can do this by using a script. I mean whenever you are creating a new version of the database. you can do that by running a script that creates a database and then stores the name of that database in an environmental variable . Now you can run psql by connecting to a database through that variable.
I'd like to be able to have several versions of a database available concurrently and one database alias that refers to the most recent of these. For example: