From: | "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru> |
---|---|
To: | John Naylor <johncnaylorls(at)gmail(dot)com> |
Cc: | David Rowley <dgrowleyml(at)gmail(dot)com>, Антуан Виолин <violin(dot)antuan(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Sort functions with specialized comparators |
Date: | 2024-12-05 18:31:53 |
Message-ID: | AC196189-C731-4C65-A042-D33DD2C38CCF@yandex-team.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 5 Dec 2024, at 15:16, John Naylor <johncnaylorls(at)gmail(dot)com> wrote:
>
> I tried on an older Intel chip and got similar results, so we'll go
> with your original comparator:
Ack.
> I believe src/port/qsort.c was meant to be just for the standard sort
> interface as found in a C library. We do have one globally visible
> special sort here:
> src/backend/utils/sort/qsort_interruptible.c
> ...so that directory seems a better fit.
OK. BTW do we need ST_CHECK_FOR_INTERRUPTS?
> The declaration is in
> src/include/port.h, though. Note: that one doesn't have a global
> wrapper around a static function -- it's declared global since
> ST_SCOPE is not defined.
Added static.
>
> And one more bikeshedding bit that might get noticed: tuplesorts
> express their boolean as "reversed". We don't necessarily need to
> follow that, but consistency is good for readability.
I do not know if "reversed sorting order" is more idiomatic than "ascending sorting order". If you think it is - let's switch argument's name to "reversed".
Best regards, Andrey Borodin.
Attachment | Content-Type | Size |
---|---|---|
v4-0001-Use-specialized-sort-facilities.patch | application/octet-stream | 3.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2024-12-05 19:08:24 | Re: meson missing test dependencies |
Previous Message | Jacob Champion | 2024-12-05 18:29:52 | Re: [PoC] Federated Authn/z with OAUTHBEARER |