title: Postgres - find min of array
body: <p>Suppose I have a table like this:</p>
  
  <pre><code>  link_ids  |  length
  ------------+-----------
   {1,4}      | {1,2}
   {2,5}      | {0,1}
  </code></pre>
  
  <p>How can I find the min length for each <code>link_ids</code>?</p>
  
  <p>So the final output looks something like:</p>
  
  <pre><code>  link_ids  |  length
  ------------+-----------
   {1,4}      | 1
   {2,5}      | 0
  </code></pre>