Re: [17+] check after second call to pg_strnxfrm is too strict, relax it
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Jeff Davis <pgsql@j-davis.com>, pgsql-hackers@postgresql.org
Date: 2024-07-30T20:01:00Z
Lists: pgsql-hackers
On 30/07/2024 22:31, Jeff Davis wrote: > I noticed this comment in selfuncs.c regarding strxfrm(): > > /* > * Some systems (e.g., glibc) can return a smaller value from the > * second call than the first; thus the Assert must be <= not ==. > */ > > Some callers of pg_strnxfrm() are not allowing for that possibility. > > Patch attached, which should be backported to 17. +1. A comment in the pg_strnxfrm() function itself would be good too. -- Heikki Linnakangas Neon (https://neon.tech)
Commits
-
Relax check for return value from second call of pg_strnxfrm().
- 403cbd210819 16.4 landed
- 10fdc67f8197 17.0 landed
- 679c5084cf21 18.0 landed