Re: [PATCH] Use ssup_datum_*_cmp for int2, oid, and oid8 sort support
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Baji Shaik <baji.pgdev@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, john.naylor@postgresql.org
Date: 2026-06-05T03:45:32Z
Lists: pgsql-hackers
On Wed, Jun 03, 2026 at 06:37:09PM -0500, Baji Shaik wrote: > int2 uses ssup_datum_int32_cmp because there is no int16-specific > helper, every int16 fits losslessly in int32, and int32_cmp is more > efficient than signed_cmp (4-byte radix passes instead of 8). That's nice for such a simple change. That seems correct to me. Could you add that to the next commit fest please at [1]? > Other custom fastcmp users in core (float4/float8, varlena types) > cannot be trivially switched due to NaN handling or locale-dependent > comparison, so they are left as-is. Nope, we cannot do that. [1]: https://commitfest.postgresql.org/59/ -- Michael
Commits
-
Use ssup_datum_*_cmp in more places
- 51cd5d6f0523 master landed
-
Perform radix sort on SortTuples with pass-by-value Datums
- ef3c3cf6d021 19 (unreleased) cited
-
Specialize tuplesort routines for different kinds of abbreviated keys
- 6974924347c9 15.0 cited