Re: Refactor: allow pg_strncoll(), etc., to accept -1 length for NUL-terminated cstrings.

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Refactor: allow pg_strncoll(), etc., to accept -1 length for NUL-terminated cstrings.
Дата
Msg-id 56d386147d2f0a269c7b8644eee05d1dce4aa80d.camel@j-davis.com
обсуждение
Ответ на Re: Refactor: allow pg_strncoll(), etc., to accept -1 length for NUL-terminated cstrings.  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Fri, 2026-05-01 at 12:40 -0400, Andres Freund wrote:
> Hi,
>
> On 2024-08-22 11:00:54 -0700, Jeff Davis wrote:
> > Like ICU, allow -1 length to mean that the input string is NUL-
> > terminated for pg_strncoll(), pg_strnxfrm(), and
> > pg_strnxfrm_prefix().
> >
> > This simplifies the API and code a bit.
>
> I don't really like this.

Agreed. I did this to match up with the ICU API a bit better, but if
it's interfering with useful tools, then the special cases aren't worth
it.

Patch attached. It causes a bit of churn, so one disadvantage is that
it will complicate future backports in this area.

Regards,
    Jeff Davis


Вложения

В списке pgsql-hackers по дате отправления: