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

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "pgsql-general" <pgsql-general(at)postgresql(dot)org>, "Adrian Klaver" <adrian(dot)klaver(at)aklaver(dot)com>
Subject: Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore
Date: 2020-03-30 18:19:17
Message-ID: F4953B0CC37C4B18AD723647CC7899AE@dell2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-03-30 18:36:59 Re: Hot standby from Debian to Windows
Previous Message Andrus 2020-03-30 18:06:50 Re: Hot standby from Debian to Windows