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

Re: Can I change the character encoding for a DB?

From: "Iain" <iain(at)mst(dot)co(dot)jp>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Can I change the character encoding for a DB?
Date: 2004-01-27 04:32:51
Message-ID: 001301c3e48e$a00bc240$7201a8c0@mst1x5r347kymb (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Hi Tom,

Thanks for that. It's somewhat clearer now.

I went ahead and rebuilt the DB with no problems so I guess that whatever
data was in the DB converted OK.


> "Iain" <iain(at)mst(dot)co(dot)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
> > has a SQL_ASCII encoding and you enter japanese text, what encoding is
> > 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

In response to

pgsql-admin by date

Next:From: JinNet PickerDate: 2004-01-27 10:53:26
Subject: 'dblink' Help
Previous:From: Tom LaneDate: 2004-01-27 03:45:09
Subject: Re: Can I change the character encoding for a DB?

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