aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts
diff options
context:
space:
mode:
authorJeff Davis <jdavis@postgresql.org>2023-03-10 10:51:24 -0800
committerJeff Davis <jdavis@postgresql.org>2023-03-10 10:51:24 -0800
commitc45dc7ffbba2cb0bf180a0b9edadc22769143e7a (patch)
tree770647258cf331fae250613a00da2f85858bc020 /src/bin/scripts
parent3e623ebc7a22444ad3d15b36ffa3273c47283e18 (diff)
downloadpostgresql-c45dc7ffbba2cb0bf180a0b9edadc22769143e7a.tar.gz
postgresql-c45dc7ffbba2cb0bf180a0b9edadc22769143e7a.zip
initdb: derive encoding from locale for ICU; similar to libc.
Previously, the default encoding was derived from the locale when using libc; while the default was always UTF-8 when using ICU. That would throw an error when the locale was not compatible with UTF-8. This commit causes initdb to derive the default encoding from the locale for both providers. If --no-locale is specified (or if the locale is C or POSIX), the default encoding will be UTF-8 for ICU (because ICU does not support SQL_ASCII) and SQL_ASCII for libc. Per buildfarm failure on system "hoverfly" related to commit 27b62377b4. Discussion: https://postgr.es/m/d191d5841347301a8f1238f609471ddd957fc47e.camel%40j-davis.com
Diffstat (limited to 'src/bin/scripts')
-rw-r--r--src/bin/scripts/t/020_createdb.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/scripts/t/020_createdb.pl b/src/bin/scripts/t/020_createdb.pl
index 8ec58cdd648..af3b1492e38 100644
--- a/src/bin/scripts/t/020_createdb.pl
+++ b/src/bin/scripts/t/020_createdb.pl
@@ -41,7 +41,7 @@ if ($ENV{with_icu} eq 'yes')
[
'createdb', '-T',
'template0', '-E', 'UTF8', '--locale-provider=icu',
- '--icu-locale=en', 'foobar5'
+ '--locale=C', '--icu-locale=en', 'foobar5'
],
qr/statement: CREATE DATABASE foobar5 .* LOCALE_PROVIDER icu ICU_LOCALE 'en'/,
'create database with ICU locale specified');