Re: Reg:CHARSET_COVERSION_LATIN_TO_UTF8

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: nandha kumar <bnandhakumardba(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Reg:CHARSET_COVERSION_LATIN_TO_UTF8
Date: 2020-09-14 08:08:27
Message-ID: CABUevEyOuQ7K3uN23M4VBF1KnJAdAWu69mGb0qGeXGGC1JcKSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Sep 14, 2020 at 7:17 AM nandha kumar <bnandhakumardba(at)gmail(dot)com>
wrote:

> Hi Team,
> I have the postgresql database with 11.4 Version in AWS RDS. Some of the
> columns have lattin collate format. I need to migrate the database to Azure
> postgresql and need to convert UTF8 column format.
>
> How to find which columns are in Latin format. How to convert the data and
> columns to UTF8.
>
>
PostgreSQL doesn't have different encoding (aka charset) on different
columns, only on databases. Latin1 and UTF8 are encodings. Columns can have
different collations, but not different encodings.

You can check your database encodings with \l in psql. All tables and
columns in one database will have the same encoding as the one listed for
the database. If you are using pg_dump to do the migration, you can use the
-E parameter to make sure the data is dumped in UTF8 format, reload that,
and all should be taken care of.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message luis.roberto 2020-09-14 13:39:26 Effective IO Concurrency
Previous Message Christophe Pettus 2020-09-14 06:11:31 Re: Why SELECT COUNT(*) takes so long?