CREATE TABLE printer_material (
printer_id integer REFERENCES printers (id),
material_id integer REFERENCES material (id),
PRIMARY KEY (printer_id, material_id)
);
INSERT INTO printer_material (printer_id, material_id)
VALUES
(1, 1),
(2, 1),
(2, 2),
(3, 1),
(3, 2),
(3, 3);