db.runSql(
'insert into skill_set_related_position (skill_set_id, create_by, update_by, position_id)\n' +
' select (m2.id, 0, 0, p2.id)\n' +
' from unnest(?::text[], ?::text[]) as skill_positions(skill_name, position_name)\n' +
' left join master_skill_set m2 on m2.name = skill_positions.skill_name\n' +
' left join position_raw p2 on p2.name = skill_positions.position_name\n' +
' left join skill_set_related_position s2 on p2.id = s2.position_id and s2.skill_set_id = m2.id\n' +
' where s2.id isnull;'
, [allSkills, allPositions])
返回错误
INSERT具有比表达式更多的目标列
但是我插入4列并选择4列?有人帮我吗?