On Tue, Aug 18, 2026 at 2:45 PM Jeff Davis <[email protected]> wrote: > > This is in the ICU-only non-deterministic collation path, so I don't > believe there's an actual bug or results change here. But for libc, it > would have been incorrect. > > Regards, > Jeff Davis >
The fix looks right to me. Perhaps the pg_strnxfrm() comment could state more explicitly that the first call is only for buffer sizing, while the return value from the actual transformation is the authoritative result length. That seems to be the assumption that was missed here. I don’t think a regression test is necessary unless there’s a simple way to exercise rsize < bsize; an ICU test would pass both before and after this patch. Regards, Haibo
