pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: James Pang (chaolpan) <chaolpan@cisco.com>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: database encoding and collation.
Date: Thu, 13 Jan 2022 20:19:34 +0100
Message-ID: <68331b01ee5ed0d02158747bf0e2d2e4476cbbb8.camel@cybertec.at> (raw)
In-Reply-To: <PH0PR11MB5191DBEC457323D03B5C4592D6529@PH0PR11MB5191.namprd11.prod.outlook.com>
References: <PH0PR11MB5191DBEC457323D03B5C4592D6529@PH0PR11MB5191.namprd11.prod.outlook.com>

On Wed, 2022-01-12 at 13:31 +0000, James Pang (chaolpan) wrote:
> We plan to migrate from Oracle to Postgresql 13, existing Oracle database charaterset WE8ISO8859P1 ,
> NLS_SORT = BINARY, NLS_COM=BINARY. we want to keep same encoding and collation in Postgresql 13 as Oracle,
> so encoding=LATIN1 (Aliases ISO88591), what’s the suggested collation and ctype? Using ‘C’,’POSIX’, or en_US.LATIN1 ?
> if using en_US.LATIN1 any impact to indexes and query where like % ?
> The OS is Redhat 8, when export NLS_LANG=en_US.LATIN1, LC_COLLATE and LC_CTYPE automatically set to en_US.LATIN1,
> and then initdb create database clusters with  collname, collation, ctype all = en_US.LATIN1.

I advise against using any encoding other than UTF-8.
What are you worried about?

For the locale, you can get the same behavior as in Oracle by using "C" or "POSIX"
(they are the same).

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (9+ messages)  latest in thread

Message-ID: <68331b01ee5ed0d02158747bf0e2d2e4476cbbb8.camel@cybertec.at>
Permalink:  ../68331b01ee5ed0d02158747bf0e2d2e4476cbbb8.camel@cybertec.at/
Also on:    postgresql.org/message-id/68331b01ee5ed0d02158747bf0e2d2e4476cbbb8.camel@cybertec.at

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, chaolpan@cisco.com, pgsql-admin@lists.postgresql.org
  Subject: Re: database encoding and collation.
  In-Reply-To: <68331b01ee5ed0d02158747bf0e2d2e4476cbbb8.camel@cybertec.at>

* 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