title: How to provide list to epgsql sql where in clause (Erlang)
body: <p>I can't find the right syntax for providing a list of values to epgsql:equery function to use in the sql where in clause. I googled and tried several variants, all of them failed. Some of my tries are below:</p>
  <pre><code>L = [1, 2, 3],
  epgsql:equery(Conn, &quot;SELECT $1::integer[]&quot;, [L]), % this works
  epgsql:equery(Conn, &quot;SELECT * FROM users WHERE id IN $1&quot;, [L]), % doesn't work
  epgsql:equery(Conn, &quot;SELECT * FROM users WHERE id IN ($1)&quot;, [L]), % doesn't work
  epgsql:equery(Conn, &quot;SELECT * FROM users WHERE id IN ($1::integer[])&quot;, [L]), % doesn't work
  epgsql:equery(Conn, &quot;SELECT * FROM users WHERE id IN unnest($1::integer[])&quot;, [L]), % doesn't work
  </code></pre>
  <p>What is the right way to do this?</p>