Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore - Mailing list pgsql-general

From Andrus
Subject Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore
Date
Msg-id F4953B0CC37C4B18AD723647CC7899AE@dell2
Whole thread Raw
In response to Re: could not determine encoding for locale "et_EE.UTF-8": codeset is"CPUTF-8" in pg_restore  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Hi!

>Not sure but:
>1) I was on Windows 7
>2) Using Postgres 11
>3) My Windows skills have atrophied, especially with the Windows command 
>line.
>So was this the same for the database you originally posted about, it 
>actually restored it just threw warnings?

Looks like it restored.  I havent checked restored data.

>If so I misunderstood the situation and thought the database was not 
>loading.

I tried

CREATE DATABASE redmine
    WITH
    ENCODING = 'UTF8'
    LC_COLLATE = 'foo'
    LC_CTYPE = 'bar' template template0

in Linux and in Windows using Postgres 12.2
In Linux it throws error

ERROR:  invalid locale name: "foo"

In Windows it creates database and throws warning only.
Without template template0 clause it throws error in Windows also.

In Linux

CREATE DATABASE redmine WITH TEMPLATE = template0 ENCODING = 'UTF8'
LC_COLLATE = 'English_United States.1252' LC_CTYPE = 'English_United
States.1252';


also throws error

ERROR:  invalid locale name: "English_United States.1252"

So it looks like pg_dump/pg_restore with --create works only from Linux to 
Windows and does not work from Windows to Linux.

I expect that it should work from Windows to Linux also.

Andrus.




pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: Re: Hot standby from Debian to Windows
Next
From: Adrian Klaver
Date:
Subject: Re: Hot standby from Debian to Windows