From: Tom Lane <tgl@sss.pgh.pa.us>
To: Iain <iain@mst.co.jp>
Cc: pgsql-admin@postgresql.org
Subject: Re: Can I change the character encoding for a DB?
Date: Mon, 26 Jan 2004 22:45:09 -0500
Message-ID: <9716.1075175109@sss.pgh.pa.us> (raw)
In-Reply-To: <000c01c3e47e$8928f1c0$7201a8c0@mst1x5r347kymb>
References: <000901c3e3e6$6cd00060$7201a8c0@mst1x5r347kymb>
<8421.1075136755@sss.pgh.pa.us>
<000c01c3e47e$8928f1c0$7201a8c0@mst1x5r347kymb>
"Iain" <iain@mst.co.jp> writes:
> I read the info written by Tasuo, but I have to admit that the whole
> encoding thing is still full of mystery for me. For example, if the database
> has a SQL_ASCII encoding and you enter japanese text, what encoding is used?
> Does it depend on the client used to enter it?
I'm not an expert on this stuff, but my understanding is that setting
the encoding to SQL_ASCII disables all encoding-conversion logic ---
whatever bytes the client sends are what get stored. So if you want
to change the setting from SQL_ASCII to something else, you'd better be
sure that everything every client has stored is compatible with the new
encoding specification.
> My understanding is that the DB
> doesn't ensure that data makes sense in the set encoding,
When you select a real encoding spec (not SQL_ASCII) then the DB does
check that entered strings are valid in that encoding. Also it will
attempt to do encoding conversion, if clients specify they are using
a client_encoding that is different from the database encoding (and
is not SQL_ASCII).
Hope that helps --- if not, try Tatsuo ...
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, iain@mst.co.jp
Subject: Re: Can I change the character encoding for a DB?
In-Reply-To: <9716.1075175109@sss.pgh.pa.us>
References: <000901c3e3e6$6cd00060$7201a8c0@mst1x5r347kymb> <8421.1075136755@sss.pgh.pa.us> <000c01c3e47e$8928f1c0$7201a8c0@mst1x5r347kymb> <9716.1075175109@sss.pgh.pa.us>
* 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