From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | Junwang Zhao <zhjwpku(at)gmail(dot)com> |
Cc: | Amit Langote <amitlangote09(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "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-10-11 05:12:40 |
Message-ID: | CACJufxELq8xim-3Cyzxe14V0Ape_emx2mUkogtO4htM+qORncQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
tricky case:
should we allow array element type to be composite/domain?
currently seems to work fine.
create table t(b int[]);
insert into t values ('{{1,3}}'), ('{{1,2}}');
select array_sort((select array_agg(t) from t), 'desc');
array_sort
-----------------------------------
{"(\"{{1,3}}\")","(\"{{1,2}}\")"}
select array_sort((t.b)) from t;
ERROR: multidimensional arrays sorting are not supported
select array_sort((select array_agg(t.b) from t));
ERROR: multidimensional arrays sorting are not supported
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Lau | 2024-10-11 05:33:54 | Doc of typmod arg perhaps deserves an update |
Previous Message | Tatsuo Ishii | 2024-10-11 04:54:54 | Re: pgbench: Improve result outputs related to failed transactinos |