After sudo port install postgresql93 postgresql93-server
# switch to su
sudo su
mkdir /var/lib/pgsql/
chown -R postgres:wheel /var/lib/pgsql
su postgres
export PGDATA=/var/lib/pgsql/9.3/data
initdb
createdb pgdbname
createuser -A -D pgusername
exit
exit
# startdb
sudo -u postgres postgres -D /var/lib/pgsql/9.3/data/
# check if login works
psql -h localhost pgdbname pgusername
\q
# add PGDATA to ~/.bash_profile
echo "export PGDATA=/var/lib/pgsql/9.3/data" >> ~/.bash_profile