Added PostgreSQL version warning on upgrade

Added PostgreSQL version warning on upgrade.

Still needs testing with an actual PostgreSQL 8.
I'm not sure yet about the approach.

@icewind1991 I was told you were working on a generic upgrade check system ? Can you push a WIP PR so I can see how it looks like and make my code closer ? (so we can save some time when putting it in)