title: how to do 'any(::text[]) ilike ::text'
body: <p>here is table structure</p>
  
  <pre><code>table1
  pk int, email character varying(100)[]
  
  data
  1, {'mr_a@gmail.com', 'mr_b@yahoo.com', 'mr_c@postgre.com'}
  </code></pre>
  
  <p>what i try to achieve is find any 'gmail' from record</p>
  
  <pre><code>query
  select * from table1 where any(email) ilike '%gmail%';
  </code></pre>
  
  <p>but <em>any()</em> can only be in left-side and <em>unnest()</em> might slow down performance. anyone have any idea?</p>
  
  <p><em>edit</em></p>
  
  <p>actually i kinda confuse a bit when i first post. i try to achieve through <em>any(array[])</em>. </p>
  
  <p>this is my actual structure</p>
  
  <pre><code>pk int, 
  code1 character varying(100), 
  code2 character varying(100), 
  code3 character varying(100), ...
  </code></pre>
  
  <p>my first approch is</p>
  
  <pre><code>select * from tabl1 where code1 ilike '%code%' or code2 ilike '%code%' or...
  </code></pre>
  
  <p>then i try</p>
  
  <pre><code>select * from table1 where any(array[code1, code2, ...]) ilike '%code%'
  </code></pre>
  
  <p>which is not working.</p>