title: array_agg for Array Types
body: <p>I'm trying to get <code>array_agg</code> to work with an array type in Postgresql and I'm having trouble figuring out if this is possible and if so how to do it. The pertinent part of my query looks like this:</p>
  
  <pre><code>array_agg(ARRAY[e.alert_type::text, e.id::text, cast(extract(epoch from e.date_happened) as text)] order by e.date_happened asc, e.id asc)
  </code></pre>
  
  <p>The error that I'm getting in response is <code>ERROR:  could not find array type for data type text[]</code></p>
  
  <p>Is this possible or should I try to find another approach?</p>
  
  <p>Thanks!</p>