postgresql insert into select from another table on conflict