Install postgres in my old ubuntu system: 12.04 (precise) (based on the introduction at http://www.postgresql.org/download/linux/ubuntu/)
1, Create a new file at the following location:
cd /etc/apt/sources.list.d/
sudo vi pgdg.list
2, Add this line to above file:
deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main
)
3, Execute:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.4 pgadmin3