title: Using a where clause in a combination with a subquery which result is a record containin an array
body: <p>I found some results/answers, regarding searching in array, but:</p>
  
  <ol>
  <li><code>WHERE = ANY</code>, works with a column, but not with a <code>subquery</code> that returns one record that contains an array as a result, triggers error</li>
  <li>WHERE IN, also triggers the same error</li>
  <li>I also tested <code>untest</code> on the subquery, similar error as the first 2</li>
  <li>I don't want to check if a value is in an array but get/execute the query for the values in the array, like <code>WHERE IN (1,2,3,4)</code>, not like in the other questions/answers</li>
  </ol>
  
  <p>The error:</p>
  
  <blockquote>
    <p>No operator matches the given name and argument types. You might need
    to add explicit type casts.</p>
  </blockquote>
  
  <p>or</p>
  
  <blockquote>
    <p>No operator matches int = int[]</p>
  </blockquote>
  
  <p>path is an <code>int[]</code>array type. </p>
  
  <p>Structure:</p>
  
  <pre><code>id | name |  | slug   | path | parent_id
  1    name1     slug1     {1}      null
  2    name2     slug2    {1,2}     1
  3    name3     slug3   {1,2,3}    2
  4    nam4      slug4   {4}       null
  </code></pre>
  
  <p>What I tries as base:</p>
  
  <pre><code>SELECT t.id, t.name, t.slug FROM types AS t
  WHERE t.id in (SELECT t.path FROM types AS t WHERE t.id = 24)
  ORDER BY depth ASC
  </code></pre>
  
  <p>Basically path is like a <code>breadcrumb</code> , <code>{grandparent,parent,type}</code></p>