title: How to use IN operator for joining tables?
body: <p>I tried this SQL query but it throws syntax error:</p>
  
  <pre><code>select * from table join table1 on (table.int_col in table1.int_array_col)
  </code></pre>
  
  <p>Wrapping <code>table1.int_array_col</code> with parenthesises doesn't work. It throws <code>operator does not exist: integer = integer[]</code> error for this query:</p>
  
  <pre><code>select * from table join table1 on (table.int_col in (table1.int_array_col))
  </code></pre>
  
  <p>The only solution that I found is to replace IN with ANY:</p>
  
  <pre><code>select * from table join table1 on (table.int_col = any (table1.int_array_col))
  </code></pre>
  
  <p>However; AFAIK IN operator performs far better than ANY operator. Is there any way to use IN operator in JOIN clause? If it's not possible, what's the reason behind this problem?</p>