Allow length=-1 for NUL-terminated input to pg_strncoll(), etc.
authorJeff Davis <jdavis@postgresql.org>
Tue, 24 Sep 2024 22:15:03 +0000 (15:15 -0700)
committerJeff Davis <jdavis@postgresql.org>
Tue, 24 Sep 2024 22:15:18 +0000 (15:15 -0700)
commitac30021356e7aa05a069741d17c3db3e8d520933
treec2c6026a3c1827ac61f88baa0e7ea812125d5222
parent1591b38d17c55015403f6e3c9461538ffcf704e7
Allow length=-1 for NUL-terminated input to pg_strncoll(), etc.

Like ICU, allow a length of -1 to be specified for NUL-terminated
arguments to pg_strncoll(), pg_strnxfrm(), and pg_strnxfrm_prefix().

Simplifies the code and comments.

Discussion: http://postgr.es/m/2d758e07dff26bcc7cbe2aec57431329bfe3679a.camel@j-davis.com
src/backend/utils/adt/pg_locale.c
src/include/utils/pg_locale.h