N
N
nluparev2018-09-09 12:37:55
PostgreSQL
nluparev, 2018-09-09 12:37:55

Why is it impossible to create a PostgreSQL database for ru_RU.UTF-8?

I'm trying to create a database in PostgreSQL using the following command:

CREATE DATABASE "имя_базы"
  WITH OWNER "postgres"
  ENCODING 'UTF8'
  LC_COLLATE = 'ru_RU.UTF-8'
  LC_CTYPE = 'ru_RU.UTF-8'
  TEMPLATE = template0;

I get the following error
ERROR: invalid locale name: "ru_RU.UTF-8"
via `locale -a` I get the following list of locales:
C
C.UTF-8
POSIX
en_US.utf8
ru_RU.utf8 i.e.
I have RU locale. What's the matter?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2018-09-09
@karabanov

The locale name must match ru_RU.utf8 (ru_RU.UTF-8 won't work)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question