title: WHERE col IN Query with empty array as parameter
body: <p>From example <a href="https://github.com/vitaly-t/pg-promise/wiki/Learn-by-Example#where-col-in-values" rel="noreferrer">where-col-in example</a> and <a href="https://stackoverflow.com/a/36847936/3563619">this answer</a>, <code>WHERE IN</code> clauses should have query with parameters with following syntax</p>
  
  <pre><code>const response = await db.any('SELECT * FROM table WHERE id IN ($1:csv)', [data])
  </code></pre>
  
  <p>where data is an array.</p>
  
  <p>Now, when data is an empty array, it produces the following query</p>
  
  <pre><code> SELECT * FROM users WHERE id IN ()
  </code></pre>
  
  <p>which is a syntax error.</p>
  
  <p>Consider following statements:</p>
  
  <ul>
  <li><p>this works</p>
  
  <pre><code>const x = await db.any('SELECT * FROM table WHERE id IN ($1:csv)', [[1, 2, 3]]);
  </code></pre></li>
  <li><p>this does not work</p>
  
  <pre><code>const y = await db.any('SELECT * FROM table WHERE id IN ($1:csv)', [[]]);
  </code></pre></li>
  </ul>
  
  <p>A <a href="https://github.com/hiddentao/squel/issues/179" rel="noreferrer">similar error</a> reported for <code>squel</code> library has answers on how <code>knex</code> and ruby's <code>sequel</code> behaves in such scenario.</p>
  
  <p>Is this a bug or am I doing something wrong? Could there be an alternate syntax which works for both scenarios.</p>
  
  <hr>
  
  <p>For instance, an alternate query using <code>ANY</code> works for both situations:</p>
  
  <pre><code>await db.any(`SELECT * FROM table WHERE id = ANY($1)`, [[1, 2, 3]]);
  await db.any(`SELECT * FROM table WHERE id = ANY($1)`, [[]]);
  </code></pre>
  
  <p>What should be the best way to have <code>WHERE col IN</code> queries which could also handle empty arrays as params?</p>