From: | "Daniel Verite" <daniel(at)manitou-mail(dot)org> |
---|---|
To: | "Cory Nemelka" <cnemelka(at)gmail(dot)com> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Issues with inconsistent COLLATION installation |
Date: | 2019-09-09 20:46:29 |
Message-ID: | 0df13b3e-cc8b-41b7-ab78-487315a28a59@manitou-mail.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Cory Nemelka wrote:
> ERROR: 22023: could not create locale "fr_FR.utf8": No such file or
> directory
> DETAIL: The operating system could not find any locale data for the locale
> name "fr_FR.utf8".
> LOCATION: report_newlocale_failure, pg_locale.c:1312
I can reproduce this by creating a new locale *after* starting
PostgreSQL and trying to use it before a restart.
Example with Ubuntu 18.04 and Postgres 11.5:
# locale-gen es_ES.utf8
Generating locales (this might take a while)...
es_ES.UTF-8... done
Generation complete.
Immediately refering to the locale will fail:
$ sudo -u postgres psql -d test -U postgres
test=# create collation es (provider=libc, locale='es_ES.utf8');
ERROR: could not create locale "es_ES.utf8": No such file or directory
DÉTAIL : The operating system could not find any locale data for the locale
name "es_ES.utf8".
Now restart postgresql
$ sudo /etc/init.d/postgresql restart
[ ok ] Restarting postgresql (via systemctl): postgresql.service.
And now it works:
$ sudo -u postgres psql -d test -U postgres
test=# create collation es (provider=libc, locale='es_ES.utf8');
CREATE COLLATION
test=# select * from pg_collation where collname='es' \gx
-[ RECORD 1 ]-+-----------
collname | es
collnamespace | 2200
collowner | 10
collprovider | c
collencoding | 6
collcollate | es_ES.utf8
collctype | es_ES.utf8
collversion |
Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-09-09 21:08:29 | Re: Issues with inconsistent COLLATION installation |
Previous Message | Tom Lane | 2019-09-09 20:29:37 | Re: Issues with inconsistent COLLATION installation |