Re: [PATCH] Use ssup_datum_*_cmp for int2, oid, and oid8 sort support

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Baji Shaik <baji(dot)pgdev(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, john(dot)naylor(at)postgresql(dot)org
Subject: Re: [PATCH] Use ssup_datum_*_cmp for int2, oid, and oid8 sort support
Date: 2026-06-05 03:45:32
Message-ID: aiJGXN9pHkJtMfnn@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-06-05 04:53:36 Re: [PATCH] xml2: Fix stylesheet document leak in xslt_process()
Previous Message shveta malik 2026-06-05 03:36:32 Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication