[NOVICE] Create PostgreSQL Database with ENCODING 'WIN1252' onCluster Initialized with locale "en_US.UTF-8"?

Поиск
Список
Период
Сортировка
От KARIN SUSANNE HILBERT
Тема [NOVICE] Create PostgreSQL Database with ENCODING 'WIN1252' onCluster Initialized with locale "en_US.UTF-8"?
Дата
Msg-id 1426412704.8061179.1487811626868.JavaMail.zimbra@psu.edu
обсуждение исходный текст
Ответы Re: [NOVICE] Create PostgreSQL Database with ENCODING 'WIN1252' on Cluster Initialized with locale "en_US.UTF-8"?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
I have a Windows DB2 database that I need to migrate to PostgreSQL 9.4 on RedHat Linux.
The database cluster was initialized with locale "en_US.UTF-8".

For my migrated database, I need to create a PostgreSQL database with ENCODING 'WIN1252'.
Is it possible to do this on my current cluster?
My research seems to indicatate that WIN1252 is a subset of UTF8.
But I can't find anything to tell me what to put for the LC_COLLATE or LC_CTYPE options.

I tried the following;
CREATE DATABASE :dbName WITH OWNER :dbOwner ENCODING 'WIN1252' CONNECTION LIMIT -1;
and got this error:
ERROR: encoding "WIN1252" does not match locale "en_US.UTF-8"
DETAIL: The chosen LC_CTYPE setting requires encoding "UTF8".

I then tried:
CREATE DATABASE :dbName WITH OWNER :dbOwner ENCODING 'WIN1252' LC_COLLATE='en_US.1252' CONNECTION LIMIT -1;
but got this error:
ERROR: invalid locale name: "en_US.1252"

And tried:
CREATE DATABASE :dbName WITH OWNER :dbOwner ENCODING 'WIN1252' LC_COLLATE='en_US.WIN1252' CONNECTION LIMIT -1;
and got this:
ERROR: invalid locale name: "en_US.WIN1252"

Any help would be greatly appreciated.
Thanks,
Karin Hilbert

В списке pgsql-novice по дате отправления:

Предыдущее
От: Rounak Jain
Дата:
Сообщение: Re: [NOVICE] alter existing table column with primary key to auto-increment
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [NOVICE] Create PostgreSQL Database with ENCODING 'WIN1252' on Cluster Initialized with locale "en_US.UTF-8"?