Unnest array by one level

前端 未结 3 1774
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-27 19:46

I want to take an array of n dimensions and return set containing rows of arrays of n-1 dimensions. For example, take the array ARRAY[[1,2,3]

3条回答
  •  感情败类
    2020-11-27 20:34

    A word of caution: when using array_agg on postgres <9 order may change PostgreSQL array_agg order If you plan to use the unnested array say for finding argmax, this will corrupt your data.

提交回复
热议问题