pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannes Dorbath <light@theendofthetunnel.de>
To: Carol Walter <walterc@indiana.edu>
Subject: Re: encoding???
Date: Tue, 26 Feb 2008 23:06:41 +0100
Message-ID: <47C48D71.3070306@theendofthetunnel.de> (raw)
In-Reply-To: <5AE10E7F-7AAD-4717-83E8-CD49BAE49F6F@indiana.edu>
References: <5AE10E7F-7AAD-4717-83E8-CD49BAE49F6F@indiana.edu>

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



view thread (3+ messages)  latest in thread

Message-ID: <47C48D71.3070306@theendofthetunnel.de>
Permalink:  ../47C48D71.3070306@theendofthetunnel.de/
Also on:    postgresql.org/message-id/47C48D71.3070306@theendofthetunnel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: light@theendofthetunnel.de, walterc@indiana.edu
  Subject: Re: encoding???
  In-Reply-To: <47C48D71.3070306@theendofthetunnel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox