title: Postgresql - Check if a given string starts with any element of the array of strings
body: <p>Given two strings we can do:</p>
  
  <pre><code>select 'aaa123' ilike 'aaa'||'%'
  </code></pre>
  
  <p>The result will be TRUE. I would like to do the same thing with a string and an array - if the given string starts with any of the elements of the array of strings than the result would show TRUE.</p>
  
  <p>For example (array and string):</p>
  
  <pre><code>select array['aaa123'::text,'bbb123'::text] as text_array
  select 'aaa12345' as string
  </code></pre>
  
  <p>I would like to do something like this:</p>
  
  <pre><code>select string ilike ANY(text_array || '%')
  </code></pre>
  
  <p>And I would expect TRUE since aaa12345 starts with aaa123 (element of the array).</p>
  
  <p>Thanks a lot for the help!</p>