| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Junwang Zhao <zhjwpku(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-10-24 15:40:04 |
| Message-ID: | CAKFQuwbrXFUgs8R1F2wsAG_V5e2qqU0FUnuLuLjrYP9VSUZFTg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Oct 24, 2024 at 8:27 AM Aleksander Alekseev <
aleksander(at)timescale(dot)com> wrote:
>
> Just making an observation / thinking out loud that the requirement to
> support everything ORDER BY handles / supports (and will handle /
> support?) might make this function impractical to maintain.
>
> Particularly, does the function really need to support dir => asc |
> desc | asc nulls first | etc... ? Maybe array_sort() + array_reverse(
> array_sort() ) will handle most of the practical cases? I don't know.
>
> [1]: https://commitfest.postgresql.org/50/5314/
>
>
Composing function calls here seems quite undesirable from a performance
standpoint, but maybe I over-estimate the cost of
exploding-manipulating-freezing an array datum. Also, while I'm not in a
good position to judge the challenge of implementing the sort parameters I
would rather have them than not since the order by API has them (plus
performance). I also, maybe unreasonably, believe that our extensible type
system has already limited the maintenance burden.
David J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2024-10-24 15:47:52 | Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR) |
| Previous Message | jian he | 2024-10-24 15:30:28 | cache lookup failed when \d t concurrent with DML change column data type |