PostgreSQL multiple column foreign key
A foreign key can also constrain and reference a group of columns. As usual, it then needs to be written in table constraint form. Here is a contrived syntax example:

CREATE TABLE t1 (
  a integer PRIMARY KEY,
  b integer,
  c integer,
  FOREIGN KEY (b, c) REFERENCES other_table (c1, c2)
);


Of course, the number and type of the constrained columns need to match the number and type of the referenced columns.

Ref : https://www.postgresql.org/docs/current/ddl-constraints.html