xxxxxxxxxx
create table device (
device_id integer primary key,
type text
);
create table combos (
station integer references device(device_id),
port integer references device(device_id)
);
insert into combos select S.device_id as station, P.device_id port from device S join device P where S.type = 'station' and P.type = 'port';
select * from combos;