From: | raghu ram <raghuchennuru(at)gmail(dot)com> |
---|---|
To: | Nicolas Michel <nicolas(dot)michel(at)lemail(dot)be> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Changing character set of existing databases |
Date: | 2009-09-10 14:46:39 |
Message-ID: | d331f2ee0909100746i484208cci28dd315875f4338b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Thu, Sep 10, 2009 at 7:08 PM, Nicolas Michel <nicolas(dot)michel(at)lemail(dot)be>wrote:
> Hello,
>
> I made a mistake an got a character set in SQL_ASCII as the defaut encoding
> type :
>
> $ psql -l
> List of databases
> Name | Owner | Encoding
> --------------+----------+-----------
> cmp_crm | openerp | SQL_ASCII
> cmp_crm_demo | openerp | SQL_ASCII
> cmp_testcrm | openerp | SQL_ASCII
> postgres | postgres | SQL_ASCII
> template0 | postgres | SQL_ASCII
> template1 | postgres | SQL_ASCII
> (6 rows)
>
> I need to get them in UTF-8. ->
> 1) Can I modify these existing databases to switch them into UTF-8? How?
>
you can't modify the existing database encoding.
> 2) Can I modify the defaut character set to create further databases in
> UTF-8 by default?
>
>
you can change the default character set for new databases and use the below
command for creation of new database with diff encoding.
create database raghu template=template1 encoding='UTF-8';
Regards
Raghu Ram
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-09-10 14:57:22 | Re: type cast from bytea to varchar or whatever |
Previous Message | Keller, Oliver | 2009-09-10 13:42:48 | FW: integer import problem |