• convert [‘foo’, ‘bar’, ‘baz’] into … WHERE col IN (‘foo’, ‘bar’, ‘baz’);.

    I do it with col = ANY($1), and $1is bound as a single value ARRAY[] on the app side (in Go I use pq.Array from lib/pq which does this)

    ANY is easier to handle than IN in this kind of queries


    score 1 · canonical