Names of encodings, lc_collate, lc_ctype - Mailing list pgsql-admin

From Holger Jakobs
Subject Names of encodings, lc_collate, lc_ctype
Date
Msg-id 3da4af02269b44a18b56a070af0bca18@jakobs.com
Whole thread Raw
Responses Re: Names of encodings, lc_collate, lc_ctype  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-admin by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: are there any expectations about pg indexes having prefixcompression?
Next
From: Tom Lane
Date:
Subject: Re: Names of encodings, lc_collate, lc_ctype