On Mon, Aug 10, 2026 at 4:07 AM David Rowley <[email protected]> wrote:
>
> 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

For the archives, I've now committed the fix discussed in that thread.
I went ahead and incorporated Peter's regression test since my draft
unnecessarily used a separate temp table

-- 
John Naylor
Amazon Web Services


Reply via email to