Ubuntu 12.04 ships PostgreSQL-9.1, why yours is 8.x?
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"
# apt-cache policy postgresql
postgresql:
Installed: (none)
Candidate: 9.1+129ubuntu1
Version table:
9.1+129ubuntu1 0
500 http://mirrors.163.com/ubuntu/ precise-updates/main amd64 Packages
9.1+129 0
500 http://mirrors.163.com/ubuntu/ precise/main amd64 Packages
Anyway, you can make it work by following alberto's reply.