admin管理员组文章数量:1122832
I want to create database on PostgreSQL installation on Alma linux (RedHat derivate) with this command:
CREATE DATABASE "ASP-ACDCliste" WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'Czech_Czechia.1250';
and I get this message back
psql:demo.out:97: ERROR: invalid LC_COLLATE locale name: "Czech_Czechia.1250"
DOPORUČENÍ: If the locale name is specific to ICU, use ICU_LOCALE.
What should I do with PostgreSQL or linux installation so that enable there Czech collation and successfully create mentioned table ?
I tried also re-initialize database on server where postgresql is installed and run:
export LANG="cs_CZ.utf8"
/usr/pgsql-16/bin/initdb -D /var/lib/pgsql/16/data
but without success.
I want to create database on PostgreSQL installation on Alma linux (RedHat derivate) with this command:
CREATE DATABASE "ASP-ACDCliste" WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'Czech_Czechia.1250';
and I get this message back
psql:demo.out:97: ERROR: invalid LC_COLLATE locale name: "Czech_Czechia.1250"
DOPORUČENÍ: If the locale name is specific to ICU, use ICU_LOCALE.
What should I do with PostgreSQL or linux installation so that enable there Czech collation and successfully create mentioned table ?
I tried also re-initialize database on server where postgresql is installed and run:
export LANG="cs_CZ.utf8"
/usr/pgsql-16/bin/initdb -D /var/lib/pgsql/16/data
but without success.
Share Improve this question edited Nov 21, 2024 at 14:31 LDonSOvrfw asked Nov 21, 2024 at 14:13 LDonSOvrfwLDonSOvrfw 496 bronze badges 2 |1 Answer
Reset to default 1Either use an existing C library collation:
CREATE DATABASE "ASP-ACDCliste"
TEMPLATE = template0
ENCODING = UTF8
LOCALE_PROVIDER = libc
LOCALE = "cs_CZ.utf8";
or use an ICU locale:
CREATE DATABASE "ASP-ACDCliste"
TEMPLATE = template0
ENCODING = 'UTF8'
LOCALE_PROVIDER = icu
ICU_LOCALE = "cs-CZ"
LOCALE = "cs_CZ.utf8";
本文标签: Enable national collation on PostgreSQL database installationStack Overflow
版权声明:本文标题:Enable national collation on PostgreSQL database installation - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736310087a1934250.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
Czech_Czechia.1250
!=cs_CZ.utf8
Also pretty sureENCODING = 'UTF8'
is incompatible withCzech_Czechia.1250
, I would say you needcs_CZ.utf8
. 2) Do you haveCzech_Czechia.1250
locale installed on machine?locale -a
will show you. – Adrian Klaver Commented Nov 21, 2024 at 16:52