Re: tuple radix sort - Mailing list pgsql-hackers

From John Naylor
Subject Re: tuple radix sort
Date
Msg-id CANWCAZZzXHoDpCx394OAhu0ppW_OanbJzYifVwuALeNMhmF8TA@mail.gmail.com
Whole thread Raw
In response to Re: tuple radix sort  ("cca5507" <cca5507@qq.com>)
Responses Re: tuple radix sort
List pgsql-hackers
On Wed, Apr 1, 2026 at 4:27 PM cca5507 <cca5507@qq.com> wrote:
>
> Hi John,
>
> How about adding an assertion here:

> +       Assert(next_level > level);
> +

Good idea.

I also thought we should change this cast:

        if (ssup->comparator == ssup_datum_signed_cmp)
        {
-               norm_datum1 = orig + ((uint64) PG_INT64_MAX) + 1;
+               norm_datum1 = orig + (Int64GetDatum(PG_INT64_MAX)) + 1;
        }

Upthread you mention something else about treating Datum as an
integer, but I'm not sure if this is what you meant since you didn't
say. If you have concrete suggestions, feel free to share them.

--
John Naylor
Amazon Web Services



pgsql-hackers by date:

Previous
From: Lakshmi N
Date:
Subject: DOCS: pg_plan_advice minor doc fixes
Next
From: John Naylor
Date:
Subject: Re: vectorized CRC on ARM64