Re: more POSIX 2008 cleanup: strnlen(), rindex() - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: more POSIX 2008 cleanup: strnlen(), rindex()
Date
Msg-id 80fdefbe-6b7c-4e1a-9935-cec3c15e62d4@eisentraut.org
Whole thread Raw
In response to Re: more POSIX 2008 cleanup: strnlen(), rindex()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 03.01.26 18:42, Tom Lane wrote:
> Jelte Fennema-Nio <postgres@jeltef.nl> writes:
>> On Sat, 3 Jan 2026 at 10:52, Peter Eisentraut <peter@eisentraut.org> wrote:
>>> It has previously been established that POSIX 2008 is the baseline for
>>> PostgreSQL code (modulo Windows).  Looking through the POSIX 2008
>>> changes, I found a few more things we can clean up with respect to that.
> 
>> Both changes look sensible to me
> 
> +1.  I also checked the buildfarm and confirm that no animals report
> not having strnlen().

committed

> I'm a little disturbed by the rindex bit, because that's not hoary old
> code: it came in with JIT in v11, only about 8 years ago.  How can we
> prevent similar mistakes in future?

AFAICT, rindex() doesn't exist on Windows, so we only got away with it 
because the JIT code is not compiled under Windows.  So in general this 
should regulate itself.




pgsql-hackers by date:

Previous
From: Mihail Nikalayeu
Date:
Subject: Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY
Next
From: Gilles Darold
Date:
Subject: Re: Pasword expiration warning