I use https://github.com/kyleconroy/sqlc to generate code. I want to return human_id using the group_id array.
-- name: HumansByGroupID :many
SELECT human_id FROM groups
WHERE group_id IN (UNNEST($1::uuid[]));
return
ERROR: set-returning functions are not allowed in WHERE (SQLSTATE 0A000)
In my understanding, ... IN (UNNEST($1::uuid[]));
turns into IN ('...','...','...');