How do you change the character encoding of a postgres database?

后端 未结 5 1401
我在风中等你
我在风中等你 2020-11-29 16:26

I have a database that was set up with the default character set SQL_ASCII. I want to switch it to UNICODE. Is there an easy way to do that?

5条回答
  •  爱一瞬间的悲伤
    2020-11-29 17:07

    To change the encoding of your database:

    1. Dump your database
    2. Drop your database,
    3. Create new database with the different encoding
    4. Reload your data.

    Make sure the client encoding is set correctly during all this.

    Source: http://archives.postgresql.org/pgsql-novice/2006-03/msg00210.php

提交回复
热议问题