pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Pospisek <tpo2@sourcepole.ch>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (en_US.utf-8)
Date: Wed, 22 Jun 2022 19:26:29 -0400
Message-ID: <3696626.1655940389@sss.pgh.pa.us> (raw)
In-Reply-To: <dca61c7b-a5e2-1269-3440-7a89a86186e1@sourcepole.ch>
References: <fedc0205-c15b-e400-aa3f-e1d2a1285ddb@sourcepole.ch>
	<8c998edf-82a1-0769-77d7-7ef5076c098c@aklaver.com>
	<dca61c7b-a5e2-1269-3440-7a89a86186e1@sourcepole.ch>

Tomas Pospisek <tpo2@sourcepole.ch> writes:
> On 22.06.22 21:25, Adrian Klaver wrote:
>> On 6/22/22 12:17, Tomas Pospisek wrote:
>>> 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';

>> Are dumping/restoring from one version of Postgres to another?

> Yes, indeed!

This is probably more about dumping from different operating systems.
The spelling of the locale name is under the control of the OS,
and Postgres doesn't know very much about the semantics of it
(so I think we conservatively assume that any difference in
spelling is significant).

Best bet might be to edit the dump file to adjust the locale
spellings to match your new system.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <3696626.1655940389@sss.pgh.pa.us>
Permalink:  ../3696626.1655940389@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3696626.1655940389@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tpo2@sourcepole.ch, adrian.klaver@aklaver.com
  Subject: Re: ERROR: new collation (en_US.UTF-8) is incompatible with the collation of the template database (en_US.utf-8)
  In-Reply-To: <3696626.1655940389@sss.pgh.pa.us>
  References: <fedc0205-c15b-e400-aa3f-e1d2a1285ddb@sourcepole.ch> <8c998edf-82a1-0769-77d7-7ef5076c098c@aklaver.com> <dca61c7b-a5e2-1269-3440-7a89a86186e1@sourcepole.ch> <3696626.1655940389@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox