DROP TABLE IF EXISTS FKTABLEFORARRAY;
CREATE TABLE FKTABLEFORARRAY (ftest1 int PRIMARY KEY, ftest2 int[]);
ALTER TABLE FKTABLEFORARRAY ADD CONSTRAINT FKARRAY FOREIGN KEY (EACH ELEMENT OF ftest2) REFERENCES PKTABLEFORARRAY;
INSERT INTO FKTABLEFORARRAY VALUES (1, '{385, 133, 7, 815, 55}');
INSERT INTO FKTABLEFORARRAY VALUES (2, '{779, 687}');
INSERT INTO FKTABLEFORARRAY VALUES (3, '{36, 615, 881, 664, 254}');
INSERT INTO FKTABLEFORARRAY VALUES (4, '{577, 146}');
INSERT INTO FKTABLEFORARRAY VALUES (5, '{940}');
INSERT INTO FKTABLEFORARRAY VALUES (6, '{192, 487, 53, 986, 63}');
INSERT INTO FKTABLEFORARRAY VALUES (7, '{849, 930, 171, 802}');
INSERT INTO FKTABLEFORARRAY VALUES (8, '{344, 980}');
INSERT INTO FKTABLEFORARRAY VALUES (9, '{994, 383}');
INSERT INTO FKTABLEFORARRAY VALUES (10, '{904, 623, 271, 917, 59}');
