On Mon, 10 Aug 2026 at 08:19, Peter Geoghegan <[email protected]> wrote: > btoidsortsupport() uses ssup_datum_unsigned_cmp() at that commit, > which compares all 64 bits of each Datum. The test case shows that the > same oid value can reach the comparator with the extraneous bits > filled two different ways. Tuple deformation sign-extends every 4-byte > pass-by-value attribute (see fetch_att() and friends), whereas > ObjectIdGetDatum() zero-extends instead. This inconsistency makes > their datums incompatible for ssup_datum_unsigned_cmp's purposes, > leading to wrong answers in certain narrow cases.
This seems to be a duplicate of [1]. David [1] https://postgr.es/m/CA+fm-RMyLC94NfrxCh273+dKs44U0ZJjRczznvzvgw=ktpp...@mail.gmail.com
