Re: more POSIX 2008 cleanup: strnlen(), rindex()

Jelte Fennema-Nio <postgres@jeltef.nl>

From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-01-03T09:58:14Z
Lists: pgsql-hackers
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



Commits

  1. Remove use of rindex() function

  2. strnlen() is now required

  3. Add pg_strnlen() a portable implementation of strlen.