=== Applying patches on top of PostgreSQL commit ID a20d50a00edc40ff11b08b1e3e3be6e4f9da51f6 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Fri Nov 20 01:41:31 UTC 2026 On branch cf/7568 nothing to commit, working tree clean === using 'git am' to apply patch ./0001-Don-t-inherit-ICU-rules-from-template-for-non-ICU-da.patch === Applying: Don't inherit ICU rules from template for non-ICU databases Using index info to reconstruct a base tree... M src/backend/commands/dbcommands.c M src/test/icu/t/010_database.pl Falling back to patching base and 3-way merge... Auto-merging src/test/icu/t/010_database.pl CONFLICT (content): Merge conflict in src/test/icu/t/010_database.pl Auto-merging src/backend/commands/dbcommands.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 Don't inherit ICU rules from template for non-ICU databases 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 ./0001-Don-t-inherit-ICU-rules-from-template-for-non-ICU-da.patch === patching file src/backend/commands/dbcommands.c Hunk #1 FAILED at 1096. 1 out of 1 hunk FAILED -- saving rejects to file src/backend/commands/dbcommands.c.rej patching file src/test/icu/t/010_database.pl Hunk #1 succeeded at 125 with fuzz 2 (offset 44 lines). Unstaged changes after reset: M src/test/icu/t/010_database.pl Removing src/backend/commands/dbcommands.c.rej === using 'git apply' to apply patch ./0001-Don-t-inherit-ICU-rules-from-template-for-non-ICU-da.patch === Applied patch to 'src/backend/commands/dbcommands.c' cleanly. Applied patch to 'src/test/icu/t/010_database.pl' with conflicts. U src/test/icu/t/010_database.pl diff --cc src/test/icu/t/010_database.pl index bce18d7676a,e40fa815da4..00000000000 --- a/src/test/icu/t/010_database.pl +++ b/src/test/icu/t/010_database.pl @@@ -81,48 -81,33 +81,77 @@@ like qr/ERROR: new locale provider \(builtin\) does not match locale provider of the template database \(icu\)/, "locale provider must match template: error message"); ++<<<<<<< ours + +# When template0 has ICU rules (initdb --icu-rules), only databases +# using the ICU provider inherit them. Other providers must be usable +# without specifying ICU rules. +my $node2 = PostgreSQL::Test::Cluster->new('node2'); +$node2->init( + extra => [ + '--locale=C', '--encoding=UTF8', + '--locale-provider=icu', '--icu-locale=en', + '--icu-rules=&a < g', + ]); +$node2->start; + +is( $node2->psql( + 'postgres', + q{CREATE DATABASE dbbuiltin LOCALE_PROVIDER builtin BUILTIN_LOCALE 'C' TEMPLATE template0} + ), + 0, + "builtin provider database can be created when template0 has ICU rules"); +is( $node2->psql( + 'postgres', + q{CREATE DATABASE dblibc LOCALE_PROVIDER libc LOCALE 'C' TEMPLATE template0} + ), + 0, + "libc provider database can be created when template0 has ICU rules"); +is( $node2->safe_psql( + 'postgres', + q{SELECT datname, daticurules IS NULL FROM pg_database + WHERE datname IN ('dbbuiltin', 'dblibc') ORDER BY datname}), + qq(dbbuiltin|t +dblibc|t), + "non-ICU databases do not inherit ICU rules from template0"); ++======= + # ICU rules set by initdb are inherited from template0 only by ICU databases + my $node2 = PostgreSQL::Test::Cluster->new('node2'); + $node2->init( + extra => [ + '--locale-provider=icu', '--icu-locale=en', + '--icu-rules=&a < g', '--encoding=UTF8' + ]); + $node2->start; + + $node2->safe_psql('postgres', + q{CREATE DATABASE dbbuiltin LOCALE_PROVIDER builtin LOCALE 'C' TEMPLATE template0} + ); + is( $node2->safe_psql( + 'postgres', + q{SELECT daticurules IS NULL FROM pg_database WHERE datname = 'dbbuiltin'} + ), + qq(t), + 'non-ICU database does not inherit ICU rules from template0'); ++>>>>>>> theirs $node2->safe_psql('postgres', q{CREATE DATABASE dbicurules TEMPLATE template0}); is( $node2->safe_psql( 'dbicurules', ++<<<<<<< ours + q{SELECT x FROM (VALUES ('a'), ('b'), ('g')) AS v(x) ORDER BY x}), + qq(a +g +b), + "ICU database inherits ICU rules from template0"); + ++======= + q{SELECT x FROM (VALUES ('a'), ('b'), ('g')) t(x) ORDER BY x}), + qq(a + g + b), + 'ICU database inherits ICU rules from template0'); ++>>>>>>> theirs done_testing();