Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o45qy-0006Zw-Mh for pgsql-general@arkaria.postgresql.org; Wed, 22 Jun 2022 19:17:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o45qx-0001up-EL for pgsql-general@arkaria.postgresql.org; Wed, 22 Jun 2022 19:17:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o45qx-0001ug-3x for pgsql-general@lists.postgresql.org; Wed, 22 Jun 2022 19:17:27 +0000 Received: from brisi.sourcepole.ch ([5.9.57.43]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o45qu-0000Yd-N2 for pgsql-general@lists.postgresql.org; Wed, 22 Jun 2022 19:17:26 +0000 Received: from [213.55.224.206] (helo=[192.168.43.81]) by vilan-mail with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o45qs-0004Ze-U2 for pgsql-general@lists.postgresql.org; Wed, 22 Jun 2022 21:17:23 +0200 Message-ID: Date: Wed, 22 Jun 2022 21:17:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Content-Language: en-GB To: pgsql-general@lists.postgresql.org From: Tomas Pospisek Subject: ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (en_US.utf-8) Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi all, while doing `cat pg_dump.dump | psql` I get the above message. Note that `pg_dump.dump` contains: CREATE DATABASE some_db WITH TEMPLATE = my_own_template ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8'; What is exactly the problem? I understand that en_US.UTF-8 and en_US.utf-8 is not *exactly* the same string. However I do not understand how the difference came to be. And I do not know what the "right" way is and how to proceed from here. If I `pg_dump --create` some DB on the new server (13.7-1.pgdg18.04+1) I get: CREATE DATABASE ... ENCODING = 'UTF8' LOCALE = 'en_US.utf-8'; When I do the same on the old server (12.8-1.pgdg20.04+1) I get: CREATE DATABASE ... ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8'; Any hints or help? *t