CREATE TABLE table_1 (
    t1_f1 integer NOT NULL,
    t1_f2 character(20) NOT NULL
);


CREATE TABLE table_2 (
    t2_f1 integer NOT NULL,
    t2_f2 integer NOT NULL
);

ALTER TABLE table_1
		ADD CONSTRAINT pk1 PRIMARY KEY (t1_f1);

ALTER TABLE table_2
		ADD CONSTRAINT pk2 PRIMARY KEY (t2_f1);

ALTER TABLE table_2
    ADD CONSTRAINT c1
		FOREIGN KEY (t2_f1)
		REFERENCES table_1(t1_f1);

ALTER TABLE ONLY table_2
    ADD CONSTRAINT c2
		FOREIGN KEY (t2_f2)
		REFERENCES table_1(t1_f1);

