Skip site navigation (1) Skip section navigation (2)

Re: Change database encoding

From: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>
To: "PostgreSQL Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Change database encoding
Date: 2006-03-28 16:34:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I guess you can not alter database encodng, so the way to change database
encoding can be following these steps:

1. Take the database dump for which you wish to change encodig using

2. Now drop the database

3. Recreate the database with the encoding you wish to

For exampe --> createdb testdb -e unicode

4. Check if the dump file created in the first step has any special
characters and do the required changes.

5. Now you can restore the dump file into the newly created database.

The advantage of using a Unicode database is that UTF-8 supports/includes
all  known encodings at once. Therefore, in the process of development, it
can help you save time.

/Shoaib Mir

On 3/28/06, Keith Worthington <keithw(at)narrowpathinc(dot)com> wrote:
> Hi All,
> When I originally built a database I did not understand the ramifications
> of
> choosing the encoding.  Not knowing any better I chose SQL-ASCII.  Since
> upgrading pgadmin3 to the latest release I am cautioned that I should
> switch to
> How do I go about changing the database encoding?
> Is UNICODE the 'best' choice for a general purpose database?
> Kind Regards,
> Keith
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?

In response to


pgsql-novice by date

Next:From: A. KretschmerDate: 2006-03-28 16:38:35
Subject: Re: plpgsql questions
Previous:From: Michael SwierczekDate: 2006-03-28 16:02:28
Subject: plpgsql questions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group