Re: [17+] check after second call to pg_strnxfrm is too strict, relax it - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: [17+] check after second call to pg_strnxfrm is too strict, relax it
Date
Msg-id 81450d84-889d-41f8-8583-5416ddd076a7@iki.fi
Whole thread Raw
In response to [17+] check after second call to pg_strnxfrm is too strict, relax it  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: [17+] check after second call to pg_strnxfrm is too strict, relax it
List 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)




pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: meson vs windows perl
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: schema variables