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

From: Andres Freund <andres(at)anarazel(dot)de>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Refactor: allow pg_strncoll(), etc., to accept -1 length for NUL-terminated cstrings.
Date: 2026-05-14 22:17:17
Message-ID: ej6fxlbyqwu6hflotvghgzowdgkeekw2up6ucyhrbbfheibtq4@uk42gkxu76s7
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2026-05-05 13:23:12 -0700, Jeff Davis wrote:
> 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.

Thanks!

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

I think it's worth the gain in instrument-ability. I also suspect it's good
for runtime performance, adding all those branches can't be particularly good.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alberto Piai 2026-05-14 22:46:32 Re: Adding a stored generated column without long-lived locks
Previous Message Jeff Davis 2026-05-14 22:00:46 Re: Add a guard against uninitialized default locale