Reference a non primary key in another table in postgresql
Postgres supports foreign keys to unique indexes (a primary key is a special case of a unique key). From the documentation


  The referenced columns must be the columns of a non-deferrable unique or primary key constraint in the referenced table