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

From Jeff Davis
Subject [17+] check after second call to pg_strnxfrm is too strict, relax it
Date
Msg-id 32f85d88d1f64395abfe5a10dd97a62a4d3474ce.camel@j-davis.com
Whole thread Raw
Responses Re: [17+] check after second call to pg_strnxfrm is too strict, relax it
List pgsql-hackers
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.

Regards,
    Jeff Davis


Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Minor refactorings to eliminate some static buffers
Next
From: Laurenz Albe
Date:
Subject: Re: proposal: schema variables