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

Re: encoding???

From: Hannes Dorbath <light(at)theendofthetunnel(dot)de>
To: Carol Walter <walterc(at)indiana(dot)edu>
Subject: Re: encoding???
Date: 2008-02-26 22:06:41
Message-ID: 47C48D71.3070306@theendofthetunnel.de (view raw or flat)
Thread:
Lists: pgsql-admin
Carol Walter wrote:
> I'm really confused about something.  I hope you'll help.  I have a 
> client who wants to use Asian Character data.  The database he wants to 
> use is set to SQL_ASCII, the default.  I thought there might be an ALTER 
> DATABASE command that would change this, but I've been through the 
> documentation and it says that encoding is done at the client level and 
> is changed with a set statement.  I assumed that would be like setting 
> the search path so I tried it and I was able to set the encoding for my 
> session to UTF8.  I guess my question is how does this work, where the 
> database is set to use one encoding sequence and it is set for the 
> client session to something else.

There are 3 things, cluster locale set at initdb, database encoding set 
at database creation and client encoding. The client encoding can be 
changed by the client at any time. PostgreSQL will translate transparent 
from client to database encoding. For UTF-8, chose a UTF-8 cluster 
locale and recreate the database, it will pick UTF-8 for the database by 
default now.


-- 
Best regards,
Hannes Dorbath

In response to

pgsql-admin by date

Next:From: Phillip SmithDate: 2008-02-26 22:22:26
Subject: Re: Backup to Tape Incomplete
Previous:From: Carol WalterDate: 2008-02-26 19:41:45
Subject: encoding???

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