Re: Encoding-related errors when moving from 7.3 to 8.0.1 - Mailing list pgsql-general

From Carlos Moreno
Subject Re: Encoding-related errors when moving from 7.3 to 8.0.1
Date
Msg-id 4240D441.1010305@mochima.com
Whole thread Raw
In response to Re: Encoding-related errors when moving from 7.3 to 8.0.1  (Carlos Moreno <moreno@mochima.com>)
Responses Re: Encoding-related errors when moving from 7.3 to 8.0.1
List pgsql-general
[...]

> This makes sense to me, yes.  The reason why I'm a bit lost is that
> we never did anything whatsoever with respect to encoding.  Oddly
> enough, I couldn't find much about this in the docs.
> [...]
>
> I guess what changed from version 7.4.x to 8.0 is that the default
> server_encoding changed?

Some further digging through the documentation reveals (in addition
to the fact that I seem to be an incompetent when it comes to search
through documentation :-)) that the above is indeed the case.

Each database apparently has its own encoding, that can be specified
with either the createdb shell command (switch -e or --encoding, IIRC),
or with the SQL command create database.

With version 7.4.x, when I execute the command:

show server_encoding;

I get SQL_ASCII as response.  Also, when I do:

select * from pg_database;

I get a bunch of columns where the encoding field contains 0 for all
of them (I never specified encoding when creating databases, so in
all those cases it took the default).

With 8.0.1, the command show server_encoding returns UNICODE as
result -- this is also the default, since I created the database
without explicitly indicating encoding.

Apparently, conversion from latin1 to UNICODE works?  (or at least
doesn't trigger an error -- I wonder if some characters appear now
incorrectly?  I'll check that).

Yes, I know I'm blah-blah-ing and answering my own questions :-)

I'm just posting the progress I've made in case someone else was
also interested in finding out more about the problem or possible
solutions.

Thanks,

Carlos
--

pgsql-general by date:

Previous
From: "Guy Rouillier"
Date:
Subject: Re: postgres oracle emulation question
Next
From: "Dann Corbit"
Date:
Subject: Re: postgres oracle emulation question