Names of encodings, lc_collate, lc_ctype

From: Holger Jakobs <holger(at)jakobs(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Names of encodings, lc_collate, lc_ctype
Date: 2019-07-10 12:20:28
Message-ID: 3da4af02269b44a18b56a070af0bca18@jakobs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello,

when using the following command on PostgreSQL 9.6 on a SLES Linux
machine

pg_dump -h machine1 -C

the output contains this line

CREATE DATABASE db1 WITH TEMPLATE = template0 ENCODING = 'UTF8'
LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';

which causes trouble on a PostgreSQL 10 or 11 on an Ubuntu 18.04 machine

ungültiger Locale-Name: »en_US.UTF-8« (meaning 'illegal locale name')

The command

select * from pg_collation;

shows (among many others of course)

en_US.utf8

But even removing the hyphen in 'en_US.UTF-8' and converting 'UTF' to
lower case doesn't remove the error.

How come there are encodings/collations/locales with and without hyphen?
Why does the Ubuntu machine not accept a locale which is present in
lc_collation?

Best Regards,

Holger

--
Holger Jakobs, 51469 Bergisch Gladbach
+49 178 9759012

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2019-07-10 13:26:48 Re: Names of encodings, lc_collate, lc_ctype
Previous Message Peter Eisentraut 2019-07-10 10:42:55 Re: are there any expectations about pg indexes having prefix compression?