pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marina Polyakova <m.polyakova@postgrespro.ru>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@postgresql.org
Cc: pryzby@telsasoft.com
Cc: rjuju123@gmail.com
Cc: daniel@manitou-mail.org
Cc: AndrewBille@gmail.com
Cc: michael@paquier.xyz
Subject: Re: ICU for global collation
Date: Wed, 21 Sep 2022 09:50:55 +0300
Message-ID: <36737f855bf3c44e701097cafd0ee2c9@postgrespro.ru> (raw)
In-Reply-To: <218b963e-dd66-626a-abd8-962afb587876@enterprisedb.com>
References: <1f86f120-7b02-68f6-a434-132d054afe33@enterprisedb.com>
	<38d2aac40a991b20adf032e509c6eff5@postgrespro.ru>
	<6dd6db0984d86a51b7255ba79f111971@postgrespro.ru>
	<20220915.155210.529619933474389138.horikyota.ntt@gmail.com>
	<a739cd973cd3c911d9bf582b6febba1c@postgrespro.ru>
	<65ef1a8a-1fc3-3dc3-c7aa-6b9f649014b2@enterprisedb.com>
	<9ba4cd1ea6ed6b7b15c0ff15e6f540cd@postgrespro.ru>
	<218b963e-dd66-626a-abd8-962afb587876@enterprisedb.com>

On 2022-09-20 12:59, Peter Eisentraut wrote:
> On 17.09.22 10:33, Marina Polyakova wrote:
>> 3.
>> 
>> The locale provider is ICU, but it has not yet been set from the 
>> template database:
>> 
>>> $ initdb --locale-provider icu --icu-locale en-US -D data &&
>>> pg_ctl -D data -l logfile start &&
>>> createdb --icu-locale ru-RU --template template0 mydb
>>> ...
>>> createdb: error: database creation failed: ERROR:  ICU locale cannot 
>>> be
>>> specified unless locale provider is ICU
> 
> Please see attached patch for a fix.  Does that work for you?

Yes, it works. The following test checks this fix:

diff --git a/src/bin/scripts/t/020_createdb.pl 
b/src/bin/scripts/t/020_createdb.pl
index 
b87d8fc63b5246b02bcd4499aae815269b60df7c..c2464a99618cd7ca5616cc21121e1e4379b52baf 
100644
--- a/src/bin/scripts/t/020_createdb.pl
+++ b/src/bin/scripts/t/020_createdb.pl
@@ -71,6 +71,14 @@ if ($ENV{with_icu} eq 'yes')
  	$node2->command_ok(
  		[ 'createdb', '-T', 'template0', '--locale-provider=libc', 'foobar55' 
],
  		'create database with libc provider from template database with icu 
provider');
+
+	$node2->command_ok(
+		[
+			'createdb', '-T', 'template0', '--icu-locale',
+			'en-US', 'foobar56'
+		],
+		'create database with icu locale from template database with icu 
provider'
+	);
  }
  else
  {

-- 
Marina Polyakova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company





view thread (111+ messages)  latest in thread

Message-ID: <36737f855bf3c44e701097cafd0ee2c9@postgrespro.ru>
Permalink:  ../36737f855bf3c44e701097cafd0ee2c9@postgrespro.ru/
Also on:    postgresql.org/message-id/36737f855bf3c44e701097cafd0ee2c9@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: m.polyakova@postgrespro.ru, peter.eisentraut@enterprisedb.com, horikyota.ntt@gmail.com, pryzby@telsasoft.com, rjuju123@gmail.com, daniel@manitou-mail.org, AndrewBille@gmail.com, michael@paquier.xyz
  Subject: Re: ICU for global collation
  In-Reply-To: <36737f855bf3c44e701097cafd0ee2c9@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox