=== Applying patches on top of PostgreSQL commit ID f4f77f557bb1a173f82be42770a28758732f4cc0 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Thu Jul 16 11:31:31 UTC 2026 On branch cf/6391 nothing to commit, working tree clean === using 'git am' to apply patch ./v2-0001-ILIKE-use-CASEFOLD-rather-than-LOWER.patch === Applying: ILIKE: use CASEFOLD() rather than LOWER(). Using index info to reconstruct a base tree... M src/backend/utils/adt/formatting.c M src/backend/utils/adt/like.c M src/test/regress/expected/collate.utf8.out M src/test/regress/sql/collate.utf8.sql Falling back to patching base and 3-way merge... Auto-merging src/test/regress/sql/collate.utf8.sql Auto-merging src/test/regress/expected/collate.utf8.out Auto-merging src/backend/utils/adt/like.c CONFLICT (content): Merge conflict in src/backend/utils/adt/like.c Auto-merging src/backend/utils/adt/formatting.c error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 ILIKE: use CASEFOLD() rather than LOWER(). When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". === using patch(1) to apply patch ./v2-0001-ILIKE-use-CASEFOLD-rather-than-LOWER.patch === patching file src/backend/utils/adt/formatting.c Hunk #1 succeeded at 1830 (offset 1 line). patching file src/backend/utils/adt/like.c Hunk #2 FAILED at 191. Hunk #3 succeeded at 209 (offset 2 lines). 1 out of 3 hunks FAILED -- saving rejects to file src/backend/utils/adt/like.c.rej patching file src/backend/utils/adt/oracle_compat.c patching file src/test/regress/expected/collate.utf8.out Hunk #1 succeeded at 176 (offset 7 lines). Hunk #2 succeeded at 363 (offset 13 lines). patching file src/test/regress/sql/collate.utf8.sql Hunk #1 succeeded at 88 (offset 3 lines). Hunk #2 succeeded at 155 (offset 4 lines). Unstaged changes after reset: M src/backend/utils/adt/formatting.c M src/backend/utils/adt/like.c M src/backend/utils/adt/oracle_compat.c M src/test/regress/expected/collate.utf8.out M src/test/regress/sql/collate.utf8.sql Removing src/backend/utils/adt/like.c.rej === using 'git apply' to apply patch ./v2-0001-ILIKE-use-CASEFOLD-rather-than-LOWER.patch === Applied patch to 'src/backend/utils/adt/formatting.c' cleanly. Applied patch to 'src/backend/utils/adt/like.c' with conflicts. Applied patch to 'src/backend/utils/adt/oracle_compat.c' cleanly. Applied patch to 'src/test/regress/expected/collate.utf8.out' cleanly. Applied patch to 'src/test/regress/sql/collate.utf8.sql' cleanly. U src/backend/utils/adt/like.c diff --cc src/backend/utils/adt/like.c index 64147bc5b5c,8fd67705f1b..00000000000 --- a/src/backend/utils/adt/like.c +++ b/src/backend/utils/adt/like.c @@@ -190,15 -191,11 +191,20 @@@ Generic_Text_IC_like(text *str, text *p errmsg("nondeterministic collations are not supported for ILIKE"))); /* ++<<<<<<< ours + * For efficiency reasons, in the C locale we don't call lower() on the + * pattern and text, but instead lowercase each character lazily. This + * only works for single-byte encodings, otherwise "_" may incorrectly + * match an incomplete byte sequence. + * + * XXX: use casefolding instead? ++======= + * For efficiency reasons, in the C locale we don't call casefold() on the + * pattern and text, but instead lowercase each character lazily. ++>>>>>>> theirs */ - if (locale->ctype_is_c) + if (locale->ctype_is_c && pg_database_encoding_max_length() == 1) { p = VARDATA_ANY(pat); plen = VARSIZE_ANY_EXHDR(pat);