From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
---|---|
To: | Junwang Zhao <zhjwpku(at)gmail(dot)com> |
Cc: | Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, "andreas(at)proxel(dot)se" <andreas(at)proxel(dot)se>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: general purpose array_sort |
Date: | 2024-11-04 11:33:51 |
Message-ID: | CAEZATCUOALcLt3ZE+5KoVM4E9H4gk3r4j00bXMQhsFjDZJZ0MQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 3 Nov 2024 at 03:33, Junwang Zhao <zhjwpku(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Kirill Reshke | 2024-11-04 11:50:50 | Re: Add missing tab completion for ALTER TABLE ADD COLUMN IF NOT EXISTS |
Previous Message | Amit Kapila | 2024-11-04 11:31:02 | Re: Allowing pg_recvlogical to create temporary replication slots |