Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id A0F4E2E0043 for ; Tue, 26 Feb 2008 18:11:54 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 89250-03 for ; Tue, 26 Feb 2008 18:11:49 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 025BC2E0039 for ; Tue, 26 Feb 2008 18:11:53 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.1/8.14.1) with ESMTP id m1QMBnwg058223 for ; Tue, 26 Feb 2008 18:11:50 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.1/8.14.1/Submit) id m1QM6i7Q056267 for pgsql-admin@postgresql.org; Tue, 26 Feb 2008 18:06:44 -0400 (AST) (envelope-from news) From: Hannes Dorbath X-Newsgroups: pgsql.admin Subject: Re: encoding??? Date: Tue, 26 Feb 2008 23:06:41 +0100 Organization: Hub.Org Networking Services Lines: 23 Message-ID: <47C48D71.3070306@theendofthetunnel.de> References: <5AE10E7F-7AAD-4717-83E8-CD49BAE49F6F@indiana.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org To: Carol Walter User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: <5AE10E7F-7AAD-4717-83E8-CD49BAE49F6F@indiana.edu> To: pgsql-admin@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/347 X-Sequence-Number: 28421 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