Install PostgreSQL on a Raspberry Pi

That is probably because the PostgreSQL apt repository does not provide ARM builds. Please check the Raspbian repository or the Debian jessie-backports repository: https://backports.debian.org/Instructions/

What you need is at least PostgreSQL 9.5+

I made some notes earlier which I have’t tested again, but you could try these (and please let us know what works and what needs to be changed):

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010
echo 'deb http://httpredir.debian.org/debian jessie-backports main contrib non-free' | sudo tee -a /etc/apt/sources.list.d/jessie-backports.list

apt-get -t jessie-backports -y install postgresql-9.6
systemctl enable postgresql@9.6-main