select t.ttt, t.created_date, concat_ws('-',lp.mmm, lp.ccc, lp.eee ) from tasks t
join positions p on t.id = p.task_id
left join lte_position lp on p.id = lp.id
where t.ttt in (:identities) and (lp.mmm, lp.ccc, lp.eee) in
((select mmm,ccc,eee from ((select unnest(array[:mmm]) as mmm, unnest(array[:ccc]) as ccc, unnest(array[:eee]) as eee)) as temp))
order by t.ttt DESC
我想在mmm
,ccc
,eee
中发送3个数组。当我在Postgres控制台上尝试正常运行时,但是当我在Java代码中尝试运行时,会引发异常
org.postgresql.util.PSQLException: ERROR: cannot cast type record to integer
Position: 474
我无法将3个数组发送到SQL语句中,它会从任务t的连接位置选择t.ttt,t.created_date,concat_ws('-',lp.mmm,lp.ccc,lp.eee)引发异常p on t.id = p.task_id左连接...