Re: encoding problem

From: "Fouad Fezzi" <Fouad(dot)Fezzi(at)iup(dot)univ-avignon(dot)fr>
To: "Alexey A(dot) Britchko" <beholder(at)roaddep(dot)ru>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: encoding problem
Date: 2003-03-25 08:16:37
Message-ID: JGEKKDOKMOJAIPCDEDPDKEAFCGAA.Fouad.Fezzi@iup.univ-avignon.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

-----Message d'origine-----
De : pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org]De la part de Alexey A.
Britchko
Envoye : mardi 25 mars 2003 07:08
A : pgsql-admin(at)postgresql(dot)org
Objet : [ADMIN] encoding problem

Hi there

How did upgrade from pgsql 6.x to pgsql 7.x:
1. Dumped database
2. ./configure --enable-locale --enable-multibyte=WIN; make; make
install;
3. Killed postmaster daemon
3. rm -rf /usr/local/pgsql/data; mkdir /usr/local/pgsql/data; chown
postgres /usr/local/pgsql/data;
4. /usr/local/pgsql/bin/initdb -E WIN -D /usr/local/pgsql/data
5. Started postmaster daemon
6. Restored database from dbdump file.

What i've got now:

$ /usr/local/pgsql/bin/psql -l
List of databases
Name | Owner | Encoding
-----------+----------+-----------
dcl | raven | SQL_ASCII
dragons | raven | SQL_ASCII
postgres | postgres | SQL_ASCII
template0 | postgres | WIN
template1 | postgres | WIN
test | postgres | SQL_ASCII
(6 rows)

The default encoding for 4 of databases is SQL_ASCII. Well, that's OK.
The database encoding is shure to be described in the dump file. And
it seems to be restored correctly.

But now when I make selections, I get data in the SQL_ASCII (a think
so) encoding instead of WIN (WIN1251). Before PostgreSQL upgrade
everything were working correctly.

The questions:
1. What happens with the database encoding when I do pg_dumpall ?
It seem to me that upgrade postrgesql database get data in SQL_ASCII
2. How can I permanently switch database encoding without
database re-initialization? If I can't, how can I do that with DB
re-initialization?
Here what i do when automatic upgrade dont't work
a_ createdb -E select-your-favorite-encoding database
b_ psql -d database -f dump.data

Hope that help

--
Best regards,
Alexey mailto:beholder(at)roaddep(dot)ru

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Charlie Clark 2003-03-25 09:50:10 Re: [Zope-DB] Zope and ZPsycopgDA almost working...
Previous Message Tamir Halperin 2003-03-25 06:20:14 Zope and ZPsycopgDA almost working...