On Sun, 3 Nov 2024 at 03:33, Junwang Zhao <zhjw...@gmail.com> wrote: > > PFA v11. >
Testing this with an array with non-default lower bounds, it fails to preserve the array bounds, which I think it should (note: array_reverse() and array_shuffle() do preserve the bounds): SELECT array_reverse(a), array_shuffle(a), array_sort(a) FROM (VALUES ('[10:12][20:21]={{1,2},{10,20},{3,4}}'::int[])) v(a); -[ RECORD 1 ]-+------------------------------------- array_reverse | [10:12][20:21]={{3,4},{10,20},{1,2}} array_shuffle | [10:12][20:21]={{10,20},{3,4},{1,2}} array_sort | [1:3][20:21]={{1,2},{3,4},{10,20}} Regards, Dean