Re: Allow tailoring of ICU locales with custom rules

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Allow tailoring of ICU locales with custom rules
Дата
Msg-id 5c09a150-cb73-39ba-28a3-3f4abebbcf49@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Allow tailoring of ICU locales with custom rules  ("Daniel Verite" <daniel@manitou-mail.org>)
Ответы Re: Allow tailoring of ICU locales with custom rules  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-hackers
On 04.02.23 14:41, Daniel Verite wrote:
> However it still leaves "daticurules" empty in the destination db,
> because of an actual bug in the current patch.
> 
> Looking at createdb() in commands.c, it creates this variable:
> 
> @@ -711,6 +714,7 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt)
>     char       *dbcollate = NULL;
>     char       *dbctype = NULL;
>     char       *dbiculocale = NULL;
> +    char       *dbicurules = NULL;
>     char        dblocprovider = '\0';
>     char       *canonname;
>     int            encoding = -1;
> 
> and then reads it later
> 
> @@ -1007,6 +1017,8 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt)
>         dblocprovider = src_locprovider;
>     if (dbiculocale == NULL && dblocprovider == COLLPROVIDER_ICU)
>         dbiculocale = src_iculocale;
> +    if (dbicurules == NULL && dblocprovider == COLLPROVIDER_ICU)
> +        dbicurules = src_icurules;
>   
>     /* Some encodings are client only */
>     if (!PG_VALID_BE_ENCODING(encoding))
> 
> but it forgets to assign it in between, so it stays NULL and src_icurules
> is taken instead.

Right.  Here is a new patch with this fixed.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: run pgindent on a regular basis / scripted manner
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: OpenSSL 3.0.0 vs old branches