Not able to install PostgreSQL 9.4 on Ubuntu
14.04 shipped with PostgreSQL 9.3, so that's what you're going to get if you use Ubuntu's repositories.

If you want PostgreSQL 9.4 or newer releases you need to add a 3rd party package repository, like the official PostgreSQL repositories from http://apt.postgresql.org/ . See the instructions there for details.

(You should also probably read https://help.ubuntu.com/community/PostgreSQL)