X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0CEEE475921 for ; Tue, 25 Mar 2003 01:06:44 -0500 (EST) Received: from adm.roaddep.ru (unknown [212.38.106.35]) by postgresql.org (Postfix) with ESMTP id 603B2474E44 for ; Tue, 25 Mar 2003 01:06:37 -0500 (EST) Received: from adm.roaddep.ru (root@localhost) by adm.roaddep.ru (8.11.6/8.9.3) with SMTP id h2P86Oj31289 for ; Tue, 25 Mar 2003 11:06:24 +0300 Received: from beholder.roaddep.ru ([192.168.1.240]) by adm.roaddep.ru (8.11.6/8.9.3) with ESMTP id h2P86Mk31243 for ; Tue, 25 Mar 2003 11:06:23 +0300 Date: Tue, 25 Mar 2003 11:07:59 +0500 From: "Alexey A. Britchko" X-Mailer: The Bat! (v1.60m) UNREG / CD5BF9353B3B7091 Reply-To: "Alexey A. Britchko" Organization: ROADDEP.RU X-Priority: 3 (Normal) Message-ID: <14060489484.20030325110759@roaddep.ru> To: pgsql-admin@postgresql.org Subject: encoding problem MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-5.8 required=5.0 tests=BAYES_10 version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200303/410 X-Sequence-Number: 8050 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 ? 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? -- Best regards, Alexey mailto:beholder@roaddep.ru