array_agg for Array Types

前端 未结 2 631
孤街浪徒
孤街浪徒 2020-12-10 11:13

I\'m trying to get array_agg 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 perti

2条回答
  •  抹茶落季
    2020-12-10 12:02

    or cast the array to text like array_agg(array[xxx, yyy]::text)

    array_agg(ARRAY[e.alert_type::text, e.id::text,
    cast(extract(epoch from e.date_happened) as text)]::text
    order by e.date_happened asc, e.id asc)
    

提交回复
热议问题