Postgres composite foreign key. The primary key is the union of these foreign keys.