Use multibyte-aware extraction of pattern prefixes.
authorJeff Davis <jdavis@postgresql.org>
Mon, 15 Dec 2025 18:24:47 +0000 (10:24 -0800)
committerJeff Davis <jdavis@postgresql.org>
Mon, 15 Dec 2025 18:24:47 +0000 (10:24 -0800)
commit9c8de1596912b36a8b22d880766ac660b66d03c7
treedae418e16e2d2aa51d92dfff1431c627cf5ddde7
parent8191937082a2d4738afc7a232ac08789eea151a3
Use multibyte-aware extraction of pattern prefixes.

Previously, like_fixed_prefix() used char-at-a-time logic, which
forced it to be too conservative for case-insensitive matching.

Introduce like_fixed_prefix_ci(), and use that for case-insensitive
pattern prefixes. It uses multibyte and locale-aware logic, along with
the new pg_iswcased() API introduced in 630706ced0.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/450ceb6260cad30d7afdf155d991a9caafee7c0d.camel@j-davis.com
src/backend/utils/adt/like_support.c