Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wI1AI-007iGe-1H for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Apr 2026 09:25:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wI1AG-002goz-2T for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Apr 2026 09:25:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wI1AG-002gop-1K for pgsql-hackers@lists.postgresql.org; Wed, 29 Apr 2026 09:25:04 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wI1AE-00000003K7Z-12RP for pgsql-hackers@lists.postgresql.org; Wed, 29 Apr 2026 09:25:03 +0000 Received: by mail-qt1-x842.google.com with SMTP id d75a77b69052e-506a747448dso88451921cf.0 for ; Wed, 29 Apr 2026 02:25:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777454702; cv=none; d=google.com; s=arc-20240605; b=VUR2eoghWlaWsUvTuBsme/oKV3J0BVYzlV0VguOEmc7Dc8TyztRk/x9t/+sAGInY9i FGet1puc9roo3wVFBvnj2M8kI3AqNp69kgESVsqcsJDGQxukHgNoAEMRfSlRnWPY8vmH JBheP//7yyQK1r48rT9iVqb7e2b+ppXyjpoAUHmEGFxRsbg2fFoRDXdAWUGgOwNwuxjl ii7YjbyF4IwseqhUfiv5K7azKVU2EIVXLbi9cPS1GLSLE+b9ENrZlE58ZzcuA65rElAG iKq0rB52lHgaD3y93knn+IX19F5vsa9iNhMdkw9CtMXRx/M+9064j1LnYCvkkjmAvMt4 wbYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ADupnUxTHaVGlc6oPC5q4hjT2XLCATQ3kBzGvmlKc/Y=; fh=Y7fqXbom4DY/T7+b90nHYg/jFv6abiMuKwoI6oPtir4=; b=SbkQpwzhW9o4MqPGERs4VQyA/qjvDWpVbgbxU8XKf3K6q0QaUWxnE0OA9DEFPYSof3 Ki/dAHQtGpp7C9WXebSwRmeF9VOij22FFmidrd4eNEArseM1MAbEXKXR3ZC+4fQdgoPY RflYUG9wE+AFcZjHDehxbb/nuaIvTBemGOZRE8Hle6RzRpkca85SSrYwsuPVFBY7WpTE 4K5mN7MvdvEqMFTKXxldugQFjHDvj8/uTuVspkYtN0hGAOTa81FV0ncaZcPSVRn9lfSl MwEoWOdGtAKy4S1vfovq1mGfcRUNe0OgANR2y3y1fpANbeva8tjLpYui6n9UM1RoGaqx 4Tew==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777454702; x=1778059502; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ADupnUxTHaVGlc6oPC5q4hjT2XLCATQ3kBzGvmlKc/Y=; b=ATlH988ies23JTwP0u7YpvnpO5ld0F/5ukWRhFank9z3rvE/LkI7Va2q8+UJPdoeLR HxYMsWfrbUJeg8856gDF5qxxAWvTK9EqW/9+cCFYirf8NnrRmUfbC9VcfSXC7l69l7o2 LmykMibmyHFVW+CIaKCXc27yWTZyArb32X9aFNu1lgWKVuoEpnoAK8EPdKCu1i7z4AUu p7hlJoJPCJwhUz07JHQGoV3FUK1JCANrupMypRKDGP5luba1XrtDlzFLbH8LlR+O7Ygd kSRu2612Yvat9pPHuYQ2dLqrpConIzbHMEG5MDzmWN2paciUx0Tsal4teiRikpmjf7rt cG4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777454702; x=1778059502; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ADupnUxTHaVGlc6oPC5q4hjT2XLCATQ3kBzGvmlKc/Y=; b=HfUsW+uym1mk9xrk8rpiruZ1ti3WDrRtGbriouIyLsXmkz2IVAInZOHMSz3gsa4XsP svjCJEtm2qucFoOdQpJcK7RsF7H5GrCe/k2dwbTFGE4SOvMpBd4Stl6BOG8usbj1fnW2 ihP/9GgEpS6j37POyMRcoxjj1eqCPN0UNMbuCtcOE2at4pHNFGeEYyTSP6eoqi4zwLXW R3ymod2tIQ4nU2cAa1apC2X3GwVgi2h/AuHSYUzPZAnupupIZqr2btq/TT91Y71tLzB3 89IQmlVx7PuAmSrQ+9Jd0+sFc9iN0+Lc9i6z822zE9LXYYwqLc4MhYZWHnmaUapEE5wY 6BWw== X-Forwarded-Encrypted: i=1; AFNElJ8UZv4DG4f6uMqCFrSkXqFKoJuduZGpgPb9w7qZVcPZCb6PcpQwkPf4mf9LgRoYl0XPCqLoaL6ee/dSLnLn@lists.postgresql.org X-Gm-Message-State: AOJu0YzNIivmx6zqlMd3j2FO6SW7abFf7gPSi5GHtoN2C601LEVvH37B P9WOFUsUilvu8yU6BIzbLIVXRdleGXAmtThMG66Q2naONKU/iuS7z6ohIx70kVKsBwenytwlE2u anw/jUJWJgt+vl/aDJtNxW3aQxLck4q4= X-Gm-Gg: AeBDiev9cL39DSzSM0JGBbfFujA8i+j5PH3AsA900XPvTelGFidxGTJOu4aUM0SW83Z GkQSc7EB2GAvHpCj3FznJzqLhtpOujn4eu6y0NAUhXeTF/lELKFP6bqYz5zA9gW4x8xeNrFN/uU lmcjlo4Es0oFM2uzITtSXzU8CkNOM+2GCw3Cy0wMwrtXacLXL/hCiHfsV7k/K4jhTF4mR0WakTL C16QlPB9hej4e6W9WN6SaoL5YwHGD5AuChNTqnmNkyvo4AGVLNBAJxabqzF2Xx3jLv8c9zQu9MU 7449dLMaunP4joq5aXHbzht+BoIKmn/MLeIZlkDjso/nc+XRU0LgL5/Wgjn0qZETV7TE7aSrffA mtGpzOIrsmShP9uyz0N2I5IUmTX20lCVCo2nD8Q== X-Received: by 2002:a05:622a:1c1a:b0:50d:7d8a:5d45 with SMTP id d75a77b69052e-5100e1b67demr94762251cf.36.1777454701522; Wed, 29 Apr 2026 02:25:01 -0700 (PDT) MIME-Version: 1.0 References: <269A8FB9-6D43-43CF-A6FE-52D28CBDB8A9@Outlook.com> <606C775A-4C1A-482B-BE7D-2E7A46AE14B9@gmail.com> <9D3D4647-868B-4562-B382-D201478AD67B@gmail.com> <54659731-2232-4E74-9533-D136D01B153F@gmail.com> In-Reply-To: From: John Naylor Date: Wed, 29 Apr 2026 16:24:50 +0700 X-Gm-Features: AVHnY4JURAkt5-yA93GLE-x6bQ7jDPn_83r-T93OuGAt7R6GRFnsHaZ5iKbVeTs Message-ID: Subject: Re: tuple radix sort To: cca5507 Cc: zengman , pgsql-hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Apr 8, 2026 at 3:20=E2=80=AFPM cca5507 wrote: > > > I also thought we should change this cast: > > > > if (ssup->comparator =3D=3D ssup_datum_signed_cmp) > > { > > - norm_datum1 =3D orig + ((uint64) PG_INT64_MAX) + 1; > > + norm_datum1 =3D 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. > > I think we can keep it as is now. It's harmless, but see commit ff89e182d. I included the assert along with the above and some small cosmetic fixes I've been saving. -- John Naylor Amazon Web Services